Re: Bash true/false builtings undocumented? "false" not working?
-----BEGIN PGP SIGNED MESSAGE-----
On Fri, Aug 17, 2018 at 07:32:39PM +1000, Zenaan Harkness wrote:
> That accords with my previous understanding, that the exist status of
> running false gives something other than "success" (i.e. zero) - what
> am I missing?
The next step: "$?" expands to "0" in your
test $? && ...
then "test" sees "0" and thinks "ah, not null (i.e. ""), ergo true",
because the only one-argument call of 'test' which 'fails' would be
I think to really grok that you need to (re-)make yourself aware of
the shell's evaluation model: first, all the expansions (variable,
path, whatever), then what appears (after expansion) att command
position gets fed what appears in arg position.
Few surviving languages have that kind of evaluation model (the shells,
Tcl -- and in a very interesting twist the Lisps). Powerful, but
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
-----END PGP SIGNATURE-----