[Linux-Biella] #!/bin/sh -e

Raffaele Salmaso raffaele.salmaso a gmail.com
Lun 13 Ott 2008 10:30:51 CEST


andrea ferraris wrote:
> Qualcuno sa che cosa diavolo significa l'opzione -e. La manpage sia di
> sh, che di bash non ne fa cenno
              -e      Exit  immediately if a simple command (see SHELL
GRAMMAR above) exits with a non-zero status.  The shell does not exit if
the command that fails is part of the command list immediately fol-
                      lowing a while or until keyword, part of the test
in an if statement, part of a && or || list, or if the command's return
value is being inverted via !.  A trap on ERR, if set, is  executed
                      before the shell exits.

(da man bash :D)

-- 
()_() | That said, I didn't actually _test_ my patch.      | +----
(o.o) | That's what users are for!                         | +---+
'm m' |                                   (Linus Torvalds) |  O  |
(___) |                      raffaele at salmaso punto org |


Maggiori informazioni sulla lista Linux