This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bash-2.x


> jan@digicash.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@po.CWRU.Edu
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]