#!/bin/sh
#
#  jback.sh, a bash script by duus made on Sun Jul 29 16:51:43 EDT 2007 
#  lives in: ~/Documents/Software/unixscripts//system/jback.sh 
#  run binedit jback to edit.  see binedit help for more information
#
_SCRIPT_NAME=jback             
_SCRIPT_LOCATION=~/bin/             
#             
if [ "$1" = "version" -o "$1" = "help" ]                
	then                                 
	echo " jback by duus  (uses popd)"          
	echo " ~/Documents/Software/unixscripts//system/jback.sh "
	echo "  jback (n) jumps back n directories (default n=1)"
	else                                 
# --- normal script here ---           
_times=$1
if [ "$_times" = "" ]
	then
	popd
else # elif [ _times "is an integer"]
	i=1
	while [ $i -lt $_times ]
		do
		popd > /dev/null &> /dev/null
		i=`expr $i + 1`
		done
	popd
fi
# -------------------------- 
# 
fi # end 'version' 
# 
# end jback, ~/Documents/Software/unixscripts//system/jback.sh
