On Sun, Sep 01, 2002 at 02:25:53PM +1000, Russell wrote: > Russell wrote: > > > > Hi, > > > > When i try a command like: > > > > debpc:# if [ -n df /mnt | grep -ie "/dev/hdc1" ] echo "yes" > > > > then after i press "return", i get a command prompt ">" which > > seems to be waiting for more input. Why does that happen? > > sorry, i missed out some things. I think the promp > happens when > the statement is unfinished (no "fi"). Should be: > > debpc:# if [ -n df /mnt | grep -ie "/dev/hdc1" ] ; then echo "yes" ; fi > > However, this gives the error: > [: missing ']' > grep: ]: No such file or directory >
if [ -n $(df /mnt | grep -ie "/dev/hdc1") ] ; then echo "yes" ; fi -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]