From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id EAA22876 for ; Tue, 11 Jun 1996 04:43:44 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id OAA28240; Mon, 10 Jun 1996 14:32:28 -0400 (EDT) Resent-Date: Mon, 10 Jun 1996 14:32:28 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199606101833.UAA06977@bolyai.cs.elte.hu> Subject: Re: Re: is this really correct To: gene@bear.com Date: Mon, 10 Jun 1996 20:33:20 +0200 (MET DST) Cc: zsh-workers@math.gatech.edu (Zsh workers list) In-Reply-To: <9606101807.AA03486@bear.com> from "gene@bear.com" at "Jun 10, 96 02:07:15 pm" Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368 X-Mailer: ELM [version 2.4ME+ PL16 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"J-6O7.0.7v6.ye6ln"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1314 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > What is the "preferred" way of testing strings that may be arbitrarily > input then given the above ? I mean one does not know what 'a' is until > you do a test on it right ? As I said I'll modify [ ... ] according to POSIX which will fix this problem (maybe it was not clear that test and [ are the same). But in zsh one can use % a="-s"; if [[ "$a" = "-s" ]] then echo "yeh" ; fi which should work with all zsh versions. Zoltan