[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cd /xxx && rm *

From: Chet Ramey
Subject: Re: cd /xxx && rm *
Date: Mon, 19 Jul 2004 15:28:15 -0400

> I found that sh and ksh return 1 on bad  cd, but bash returns 0.
> So bash : cd /xxx && rm *   - will remove everything in your current

Not true.

caleb.INS.CWRU.Edu(1)$ cd /xxx
-bash: cd: /xxx: No such file or directory
caleb.INS.CWRU.Edu(1)$ echo $?

You probably have a shell function for cd that returns success

``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Chet Ramey, ITS, CWRU    address@hidden    http://tiswww.tis.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]