On Tue 24 Apr 2007 02:31:53 NZST +1200, Thomas Schmitt wrote: > There are two old forms of for-loops: > for i ; do
Current bash lists it as valid syntax, so it's not "old". > I cannot read from any man pages the correctness of > for i in ; do Read the man bash again. It's the in being present, but the item list being empty. > which seems to be somehow ignored by modern bash. Good thing too. As the loop is iterated for each item specified after in, and none are specified, the expected, pardon me, necesssary, result is to not loop at all. No surprise there. man bash even explicitly states: If the expansion of the items following in results in an empty list, no commands are executed, and the return status is 0. > I got an antiquity online (some SuSE 6.x): > $ uname -a > Linux * 2.2.13 #1 Mon Nov 8 15:51:29 CET 1999 i686 unknown > $ for i in ; do echo $i ; done > bash: syntax error near unexpected token `;' The syntax is valid, therefore the shell is buggy. It works fine on ksh, ash, pdksh on openSUSE 10.2. 2.2.13 allows to deduce the SUSE version to be 6.3. That in turn allows to look up the bash version to have been bash-2.03-24. (If you want to get package info of many historic SUSE versions, download the susegrep-data packages from my website.) Volker -- Volker Kuhlmann is list0570 with the domain in header http://volker.dnsalias.net/ Please do not CC list postings to me. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]