On Sun, Jun 28, 2009 at 11:42:58AM +0200, Michelle Konzack wrote:
> But I would prefer something like:
>
> if [ $(cd "$1") -ne 0 ]
> then echo "badbadbad" ; exit 1
> fi
Note that this runs the 'cd' command in a subdirectory, and thus it has
no effect on the parent process.
And then again, you could have simply used:
if !cd "$1"; then
echo "badbadbad"
exit 1
fi
--
Tzafrir Cohen | [email protected] | VIM is
http://tzafrir.org.il | | a Mutt's
[email protected] | | best
ICQ# 16849754 | | friend
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]