zsh-workers
 help / color / mirror / code / Atom feed
* Interesting tidbit from the austin-group list
@ 2003-04-01  2:42 Bart Schaefer
  2003-04-01  3:22 ` Dan Nelson
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2003-04-01  2:42 UTC (permalink / raw)
  To: zsh-workers


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.
------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Interesting tidbit from the austin-group list
  2003-04-01  2:42 Interesting tidbit from the austin-group list Bart Schaefer
@ 2003-04-01  3:22 ` Dan Nelson
  2003-04-01  5:35   ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Nelson @ 2003-04-01  3:22 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-workers

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Interesting tidbit from the austin-group list
  2003-04-01  3:22 ` Dan Nelson
@ 2003-04-01  5:35   ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2003-04-01  5:35 UTC (permalink / raw)
  To: zsh-workers

On Mar 31,  9:22pm, Dan Nelson wrote:
}
} I don't think (( is even a word.  It's two nested subshells.

You're correct, as I should have realized and as was pointed out on the
austin-group list a couple of hours after I forwarded the previous snippet.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-04-01  5:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-01  2:42 Interesting tidbit from the austin-group list Bart Schaefer
2003-04-01  3:22 ` Dan Nelson
2003-04-01  5:35   ` Bart Schaefer

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).