-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Toby Kelsey on 6/8/2006 4:34 AM: > for i in 31 31 32; do sleep $i & done > > (note the last one should give a syntax error since it violates the > for-loop > syntax "for name [ in word ] ; do list ; done", but instead it works)
Actually, according to the POSIX grammar, http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_10_02, the syntax for <for_clause> includes a <do_group>, which is 'do' <compound_list> 'done'; and the syntax of a compound list can end in a <separator_op> which is either '&' or ';'. Using BOTH '&' and ';' is the true syntax error, and the above example is not a workaround, but the correct syntax. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEiCIA84KuGfSFAYARApwgAJ9UkLS0+MT7gZ5PiEXdeWWrEDvRKwCgmw5d dK8Is4pQTrOpT9WU7ub+y8w= =9QiW -----END PGP SIGNATURE----- _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash