Date: Mon, 2 Jun 1997 00:00:06 -0700 (PDT)
From: j@uriah.heep.sax.de (J Wunsch)
To: freebsd-bugs
Subject: Re: conf/3751: Improvements to /etc/rc{,.network,.pccard}
Message-ID: <199706020700.AAA03046@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/3751; it has been noted by GNATS.
From: j@uriah.heep.sax.de (J Wunsch)
To: Harlan.Stenn@pfcs.com (Harlan Stenn)
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/3751: Improvements to /etc/rc{,.network,.pccard}
Date: Mon, 2 Jun 1997 08:50:31 +0200
As Harlan Stenn wrote:
> Several RC scripts use confusing syntax. If I was really being a speed
> freak I'd replace the if [ ... ] stuff with case statements...
> -if [ $1x = autobootx ]; then
> +if [ "$1" = autoboot ]; then
That's not entirely confusing syntax. It's normal habit to be on the
safe side. Although i agree, the quotes should always be there, and
the X should always be prepended.
Prepending the X saves you from hidden gotchas like in:
foo="-ain't this weird?-"
if [ "$foo" = "bar" ] ; ...
--
cheers, J"org
joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706020700.AAA03046>
