Subject: Re: bash-2.x
From: [email-masked] (Chet Ramey)

24 Jul 1998 02:38:49 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
Reply-To: [email-masked]
Content-Type: text/plain; charset=us-ascii
To: [email-masked], [email-masked]
Cc: [email-masked], [email-masked]

> [email-masked] 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: [email-masked]
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".