[2018-11-15 12:43] Cristian Ionescu-Idbohrn <cristian.ionescu-idbo...@axis.com>
> The point I was trying to make is that with code like this:
> 
>       cd /var/log && {
>               ... do stuff ...
>       }
>       ^
> after the closed curly bracket above, if $? is _not_ 0 either the `cd' 
> command failed or some stuff inside the command list.  But with:
> 
>       ! cd /var/log || {
>               ... do stuff ...
>       }
>       ^
> at this point, if $? is _not_ 0 then you can be sure some stuff inside 
> the command list failed.

Your proposal changes semantics. For my uneducated view, considering failed
`cd /var/log' as `$? = 0' is strange.

Reply via email to