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 EAA22200 for ; Tue, 11 Jun 1996 04:03:03 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id NAA26783; Mon, 10 Jun 1996 13:50:43 -0400 (EDT) Resent-Date: Mon, 10 Jun 1996 13:50:43 -0400 (EDT) Sender: hniksic@public.srce.hr To: zsh-workers@math.gatech.edu (ZSH Workers Mailing List), gene@bear.com Subject: Re: Is this really correct ? References: <9606101721.AA03238@bear.com> From: Hrvoje Niksic Date: 10 Jun 1996 19:42:44 +0200 In-Reply-To: gene@bear.com's message of Mon, 10 Jun 1996 13:21:45 -0400 Message-ID: X-Mailer: Gnus v5.2.14/XEmacs 19.13 Resent-Message-ID: <"mf3gu2.0.PY6.p16ln"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1310 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu gene@bear.com (gene@bear.com) wrote: > > > Hpux 9.05. > > % echo $ZSH_VERSION > 2.6-beta20 > % a="-s"; if [ "$a" = "-s" ] ; then echo "yeh" ; fi > % > > (if fails) If $a is -s, then the test builtin probably tests for whether file '=' exists and has a size greater than zero :-). This works for me: $ echo hi > = $ a="-s"; if [ "$a" = "-s" ] ; then echo "yeh" ; fi yeh Thus, it may be an sh incompatibility, but not a bug. Unless the shell is supposed to count the arguments first, and then use draw the conclusions according to the argument values (in which case the middle argument would recognized as two-operand =). -- hniksic@srce.hr | Student of electrical engineering hniksic@fly.cc.fer.hr | University of Zagreb, Croatia ------------------------------------------------------------------ * Q: What is an experienced Emacs user? * A: A person who wishes that the terminal had pedals.