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         | tzaf...@jabber.org | VIM is
http://tzafrir.org.il |                    | a Mutt's
tzaf...@cohens.org.il |                    |  best
ICQ# 16849754         |                    | friend


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to