svn commit: r291929 - head/tools/tools/nanobsd

Ed Maste emaste at freebsd.org
Mon Dec 7 18:48:03 UTC 2015


On 7 December 2015 at 13:13, Ian Lepore <ian at freebsd.org> wrote:
>
> While I am generally a quoting fanatic and would much rather overquote
> than underquote in shell scripts, fyi it's not actually needed for the
> -n and -z tests.  test(1) and shells seem to be smart enough to see the
> ']' (which is just an arg to test, not shell language syntax) and know
> there isn't a string in front of it.

With sh(1) I see:

$ [ -n ] && echo true
true
$ [ -z ] && echo true
true


More information about the svn-src-head mailing list