Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Dec 2015 13:47:43 -0500
From:      Ed Maste <emaste@freebsd.org>
To:        Ian Lepore <ian@freebsd.org>
Cc:        Warner Losh <imp@freebsd.org>,  "src-committers@freebsd.org" <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r291929 - head/tools/tools/nanobsd
Message-ID:  <CAPyFy2CD92b6WPV7%2BzFz7ck86p5cNEvncd6L15UP1MDgnihZMQ@mail.gmail.com>
In-Reply-To: <1449512013.1358.6.camel@freebsd.org>
References:  <201512071024.tB7AOcjr094296@repo.freebsd.org> <1449512013.1358.6.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 7 December 2015 at 13:13, Ian Lepore <ian@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2CD92b6WPV7%2BzFz7ck86p5cNEvncd6L15UP1MDgnihZMQ>