On Mon, 27 Feb 2012 11:22:26 -0000, Andrew Stubbs <email address hidden> wrote:
> Assuming that commands are executed in a shell, an individual command
> can be allowed to fail like this:
>
> command that might fail || true
>
> so, if it fails it runs "true", so the command as a whole gives success.
>
> Equally, it could be:
>
> command || echo "COMMAND FAILED"
>
> The echo completes successfully, so the whole commands always reports
> success.
On Mon, 27 Feb 2012 11:22:26 -0000, Andrew Stubbs <email address hidden> wrote:
> Assuming that commands are executed in a shell, an individual command
> can be allowed to fail like this:
>
> command that might fail || true
>
> so, if it fails it runs "true", so the command as a whole gives success.
>
> Equally, it could be:
>
> command || echo "COMMAND FAILED"
>
> The echo completes successfully, so the whole commands always reports
> success.
Err. We all know that :-)