Am 12.04.2013 18:26, schrieb Lenga, Yair:
> Chet,
>
> Sorry again for pulling the wrong Bash 4 doc. 
>
> Based on the input, I'm assuming that the portable way (bash 3, bash 4 and 
> POSIX) to retrieve $? When running under "-e" is to use the PIPEr
> CMD_STAT=0 ; GET_MAIN_DATA || CMD_STAT=$?
That isn't a pipe its a logical or, it means if the first command
returns non 0 execute the next command.
as the assignment will not fail it avoids the problem.
as such you could also do

GET_MAIN_DATA || GET_BACKUP_DATA

or 

if ! GET_MAIN_DATA ; then
  GET_BACKUP_DATA
fi



Reply via email to