#!/bin/ksh
if [ $# -eq 0 ] ; then
echo ""
echo "Usage: godir {dirname}"
echo ""
exit
else
cd /dir1/adir/thisdir/diriwant/$1
fi
The Usage part works just fine, but of course when it hits the CD command, it give me an error, more or less that "cd" is not found.
Now i've been told the cd command can't be used in a script because its part of the shell, but i would think there is some way to call it so that it responds without placing you back in your home directory or erroring out.
any idea's?