Bourne shell "if" syntax
jb
jb.1234abcd at gmail.com
Mon Jun 10 19:53:03 UTC 2013
Michael Sierchio <kudzu <at> tenebras.com> writes:
> ...
> Right. Many scripts seem to assume that sh is bash, and that's
> certainly not the case here.
>
> if [ "x$BLAH" = "x" ]; then
>
> is the most reliable and portable way of determining if it's a string
> of zero length.
Actually this trick is not needed any more (it has not been required for
long time because the problem was fixed).
http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2012-August/004275.html
jb
More information about the freebsd-questions
mailing list