zsh-workers
 help / color / mirror / code / Atom feed
From: Hrvoje Niksic <hniksic@srce.hr>
To: zsh-workers@math.gatech.edu (ZSH Workers Mailing List), gene@bear.com
Subject: Re: Is this really correct ?
Date: 10 Jun 1996 19:42:44 +0200	[thread overview]
Message-ID: <kigbuirlfmz.fsf@jagor.srce.hr> (raw)
In-Reply-To: gene@bear.com's message of Mon, 10 Jun 1996 13:21:45 -0400

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.



  reply	other threads:[~1996-06-10 18:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-10 17:21 gene
1996-06-10 17:42 ` Hrvoje Niksic [this message]
1996-06-10 18:17   ` Zoltan Hidvegi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=kigbuirlfmz.fsf@jagor.srce.hr \
    --to=hniksic@srce.hr \
    --cc=gene@bear.com \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).