[plug] return values

Anthony J. Breeds-Taurima tony at cantech.net.au
Fri Jun 14 10:00:07 WST 2002


On Fri, 14 Jun 2002, Carl Gherardi wrote:

> Not really for a script, but handy from the command line:
> 
> make && make install && make clean
> 
> && will only execute if the return code is 0 (success)

Use it in a script like:

[ -d /tmp/Carl ] && /bin/rm -rf /tmp/Carl

Or the locigal flip is:

[ -d /tmp/Carl ] || mkdir  /tmp/Carl

Yours Tony

Jan 22-26 2003      Linux.Conf.AU       http://conf.linux.org.au/
         The Australian Linux Technical Conference!



More information about the plug mailing list