On Sat, 1 Dec 2018, Dmitry Bogatov wrote:
> AFAIK, in shell [ "${foo}" ] is equal to [ -n "${foo}" ].
Not always / portably.
I recommend
test -n "$foo"
for POSIX (which is equivalent to [ -n "$foo" ] but better legible and
making it clear that test is an external command, not a language con‐
struct), and
[[ $foo ]]
for Korn shell and compatibles, including (here) GNU bash.
bye,
//mirabilos (mksh developer)
--
15:41⎜<Lo-lan-do:#fusionforge> Somebody write a testsuite for helloworld :-)
_______________________________________________
Pkg-systemd-maintainers mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-systemd-maintainers