From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2953 invoked from network); 13 Sep 1999 07:21:48 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Sep 1999 07:21:47 -0000 Received: (qmail 17695 invoked by alias); 13 Sep 1999 07:21:32 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2597 Received: (qmail 17688 invoked from network); 13 Sep 1999 07:21:32 -0000 Message-ID: <37DCA5D3.963A5888@camline.com> Date: Mon, 13 Sep 1999 09:20:51 +0200 From: Johannes =?iso-8859-1?Q?M=E4hner?= Organization: camline X-Mailer: Mozilla 4.6 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: Gaspar Bakos CC: zsh-users@sunsite.auc.dk Subject: Re: evaluating a condition References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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