Claude M. Schrader on 22 Jun 2009 13:40:59 -0700 |
On 11:08 Mon 22 Jun , Isaac Bennetch wrote: > || (two pipes) will execute the > second command only if the first command errors (well, returns a > non-zero status). To add some context, this construction is used often for error handling in scripts. As a simple example, you could do something like: /bin/cp /root/$file /mnt/server/archive || echo "$file copy failed" ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|