From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22518 invoked from network); 1 Apr 2003 03:23:01 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 1 Apr 2003 03:23:01 -0000 Received: (qmail 12466 invoked by alias); 1 Apr 2003 03:22:55 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18414 Received: (qmail 12459 invoked from network); 1 Apr 2003 03:22:55 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 1 Apr 2003 03:22:55 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [199.67.51.101] by sunsite.dk (MessageWall 1.0.8) with SMTP; 1 Apr 2003 3:22:54 -0000 Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h313MgZD087748; Mon, 31 Mar 2003 21:22:42 -0600 (CST) (envelope-from dan) Date: Mon, 31 Mar 2003 21:22:42 -0600 From: Dan Nelson To: Bart Schaefer Cc: zsh-workers@sunsite.dk Subject: Re: Interesting tidbit from the austin-group list Message-ID: <20030401032242.GB1547@dan.emsphone.com> References: <1030401024203.ZM17165@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1030401024203.ZM17165@candle.brasslantern.com> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i In the last episode (Apr 01), Bart Schaefer said: > Jason Zions wrote: > ------------------------------------------------------------------------ > Since (( is not permitted to be a reserved word, a conforming shell > *cannot* treat it as such. Among other things, if there is an executable > file named (( anywhere in $PATH, then > > while (( $count < $NUMLOOPS )) > > is required to invoke that executable program rather than any > functionality built into the shell. > ------------------------------------------------------------------------ I don't think (( is even a word. It's two nested subshells. A conforming shell should run the command $count, with stdin redirected from $NUMLOOPS, inside a subshell inside a subshell. ash behaves this way: $ while (( 1 < 2 )) ; do echo hi ; sleep 1; done 1: not found $ while (( true < 2 )) ; do echo hi ; sleep 1; done cannot open 2: No such file or directory [[ is a different story, though. Forcing that to be interpreted as a command has a precedent: "[" aka test. -- Dan Nelson dnelson@allantgroup.com