Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Is this really correct ?
- X-seq: zsh-workers 1310
- From: Hrvoje Niksic <hniksic@xxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (ZSH Workers Mailing List), gene@xxxxxxxx
- Subject: Re: Is this really correct ?
- Date: 10 Jun 1996 19:42:44 +0200
- In-reply-to: gene@xxxxxxxx's message of Mon, 10 Jun 1996 13:21:45 -0400
- References: <9606101721.AA03238@xxxxxxxx>
- Sender: hniksic@xxxxxxxxxxxxxx
gene@xxxxxxxx (gene@xxxxxxxx) 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@xxxxxxx | Student of electrical engineering
hniksic@xxxxxxxxxxxxx | University of Zagreb, Croatia
------------------------------------------------------------------
* Q: What is an experienced Emacs user?
* A: A person who wishes that the terminal had pedals.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author