delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/07/24/02:38:49

From: chet AT nike DOT ins DOT cwru DOT edu (Chet Ramey)
Subject: Re: bash-2.x
24 Jul 1998 02:38:49 -0700 :
Message-ID: <980723165331.AA29283.SM.cygnus.gnu-win32@nike.ins.cwru.edu>
References: <13750 DOT 64631 DOT 233777 DOT 935128 AT vbassa DOT cs DOT uu DOT nl>
Reply-To: chet AT po DOT cwru DOT edu
To: jan AT digicash DOT com, hanwen AT cs DOT uu DOT nl
Cc: yodl AT icce DOT rug DOT nl, gnu-win32 AT cygnus DOT com

> jan AT digicash DOT com writes:
> > Hi,
> > 
> > After all this trouble with bash, i downloaded bash-docs-2.02,
> > and it says:
> > 
> >        for name [ in word; ] do list ; done
> 			   ^
> 
> > 
> >     10:55:25 mub ~/ftp/gnu/bash-2.02$ for i in ;do echo $i; done
> >     bash: syntax error near unexpected token `;d'
> > 
> > It looks like a bug in bash-2.02(-release)

No.  It is not a bug.  If the `in' keyword is supplied, a non-empty
wordlist must be specified before the list terminator (the semicolon
or newline).  You may leave out the `in' and the wordlist, in
which case it defaults to the positional parameters (as if `in "$@"'
had been supplied).

The text between the square brackets in the synopsis indicates an
optional unit, with one problem, described below.  You can either
supply `in words' or nothing. 

The description should more properly read

	for name [ in word ] ; do list ; done

This is a documentation bug in the manual page that will be corrected
for the bash-2.03 release.  The texinfo document has the correct syntax.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, Case Western Reserve University	Internet: chet AT po DOT CWRU DOT Edu
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019