On 2008-07-13T15:21:21-0400, Allan Wind wrote: > Finally, you could check for the error conditions before doing the cd: > > if [ -d $dir -a -x $dir ]; > then > echo cannot cd into $dir > else > cd $dir > fi
Reverse the logic of course:
if [ -d $dir -a -x $dir ];
then
cd $dir
else
echo cannot cd into $dir
fi
/Allan
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

