Re: Bash true/false builtings undocumented? "false" not working?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, Aug 23, 2018 at 02:59:18PM +0200, Stefan Krusche wrote:
[...]
> Nothing. What Tomás wrote is false (has exit code "1" ;-)
>
> This:
>
> test $? && echo ok || echo error $?
>
> does *not* expand as Tomás said to:
>
> test 0 && echo ok || echo error 0
>
> but to:
>
> test 1 && echo ok || echo error 1
>
> And "test 1" also succeeds, see Greg's message.
You are of course right. The outcome may be the same (because neither
"0" nor "1" are null (i.e. "")), but $? is "1" after false.
Sorry for the botch, and thanks for paying attention :-)
Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlt+w5MACgkQBcgs9XrR2kaSfgCaA2ILHFCxcYhHT9cdvLCGfORq
L1MAnAuc/W/PcFjSP2qLY7jxkM62YWQf
=aWTH
-----END PGP SIGNATURE-----
Reply to: