SLUG Mailing List Archives
Re: [SLUG] script question
- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] script question
- From: Russell Davies <russell.davies@xxxxxx>
- Date: Mon Jul 30 15:09:01 2001
; Sonam Chauhan wrote:
; > > Russell Davies wrote:
; > > > grep pattern file || command
; > >
; > ...
; > >
; > > If grep doesn't match, it returns 1 ("man grep" for details)
; > > and the command to the right of the OR operator is executed.
; > > If you're familiar with boolean logic, think of it as a logic
; > > short-circuit operation, with the expression on the left
; Small Correction: the expression on the *right* is executed
; when the one on the left is 'true'.
no. wrong again. The expression on the right is executed when the
expression on the left is *false*