Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Interesting tidbit from the austin-group list
- X-seq: zsh-workers 18414
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Interesting tidbit from the austin-group list
- Date: Mon, 31 Mar 2003 21:22:42 -0600
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <1030401024203.ZM17165@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <1030401024203.ZM17165@xxxxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author