Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: evaluating a condition
- X-seq: zsh-users 2597
- From: Johannes Mähner <johanm@xxxxxxxxxxx>
- To: Gaspar Bakos <bakos@xxxxxxxxxx>
- Subject: Re: evaluating a condition
- Date: Mon, 13 Sep 1999 09:20:51 +0200
- Cc: zsh-users@xxxxxxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- Organization: camline
- References: <Pine.LNX.3.96.990912203255.17690A-100000@xxxxxxxxxxxxxxxxxx>
Gaspar Bakos wrote:
>
> Hi,
>
> As a beginner in zsh, I would have a question concerning an 'if'
> structure.
>
> I have the following script, and I would like to print the numbers in the
> terminal from ${min} to ${max}, if both of them are smaller than 10.
>
> export min=$3;export max=$4;
> if (($[min]<10 && $[max]<10)) then
> for i in {${min}..${max}}; do echo $i; done
> fi
>
> However, this prints the numbers even if ${max}>10
>
> Can someone help?
>
> Gaspar
What version of zsh are you using?
With zsh 3.1.6, your code works fine
Messages sorted by:
Reverse Date,
Date,
Thread,
Author