Nobuyuki Tsuchimura <tutimura@nn.iij4u.or.jp> wrote:
>> $ for f in ; do echo '$f='$f; done
>> bash: syntax error near unexpected token `;'
>
> According to man, this should do nothing, I think.
>
>> If the expansion of the items following in results in an empty list,
>> no commands are executed, and the return status is 0.
There's a difference between items that expand to an empty list, and
no items at all. The man page is talking about code like this:
for f in $list ; do ... ; done
where $list may be empty. However, the lastest version of bash,
2.05a, also accepts the "for f in ;" syntax.
paul