From owner-freebsd-current Sat Aug 21 17:18:47 1999 Delivered-To: freebsd-current@freebsd.org Received: from dt011n65.san.rr.com (dt010nb9.san.rr.com [204.210.12.185]) by hub.freebsd.org (Postfix) with ESMTP id E4F4D14E7B for ; Sat, 21 Aug 1999 17:18:40 -0700 (PDT) (envelope-from Doug@gorean.org) Received: from gorean.org (master [10.0.0.2]) by dt011n65.san.rr.com (8.9.3/8.8.8) with ESMTP id RAA83493; Sat, 21 Aug 1999 17:17:21 -0700 (PDT) (envelope-from Doug@gorean.org) Message-ID: <37BF419B.37C260D3@gorean.org> Date: Sat, 21 Aug 1999 17:17:31 -0700 From: Doug Organization: Triborough Bridge & Tunnel Authority X-Mailer: Mozilla 4.61 [en] (X11; U; FreeBSD 4.0-CURRENT-0815 i386) X-Accept-Language: en MIME-Version: 1.0 To: "Jordan K. Hubbard" Cc: Harlan Stenn , Warner Losh , current@FreeBSD.ORG Subject: Re: REQ: Test /etc/rc clean-up References: <81513.935279978@localhost> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Jordan K. Hubbard" wrote: > > > I gather the reason for using the X trick *and* the quotes is because there > > might be some whitespace in there, too. > > Actually, that's mostly just historical legacy. When the quotes, it's > safe even if the expansion is empty or contains whitespace. The X also protected test from the case where the expansion included a string like "-x", although with most modern implementations of test (or shells with test as a builtin) this is no longer a problem. > I got > kinda annoyed with this last night and did the following: I agree with some of your changes here, but can you explain your objection to using case? My argument is that case is a builtin so it makes things just a little bit cleaner, and more importantly it makes case insensitivity for the options that much easier to implement which is a huge win in user friendliness. For example, what happens to if [ "${pccard_ifconfig}" != "NO" ] if the user makes the flag "no"? I'd say that the fact that this is going to go off anyway violates POLA, all "stupid user" arguments aside. Doug To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message