|
Hi,
The OR (||) and AND (&& ) operators can be used as well:
ls foo && cat foo
cat foo is only executed when ls foo has no errors (in this case, foo must exist)
ls foo || touch foo
touch foo is executes only when ls foo has an error (does not exist in this example)
Hope this helps.
__________________
The dead stay dead and the living only wait to join them........
|