tmz at pobox.com
Wed Jun 20 04:19:15 UTC 2007
charles f. zeitler wrote:
> i'm having problems with getting a while loop to work.
> this script:
> while [ 1 ]
> when run, gives these error messages:
> /home/fedora/0_scripts/done.ba: line 6: syntax error near unexpected token
> /home/fedora/0_scripts/done.ba: line 6: `done'
> at the command line,
> while [ 1 ] ; do ; done
> gives: bash: syntax error near unexpected token `;'
The syntax in the bash man page is:
while list; do list; done
You're missing 'list' after do. You need to do something in the loop.
This works (not that it's useful):
while [ 1 ]; do echo "through the loop we go"; done
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
Erotic is when you use a feather, kinky is when you use the whole
-- C. Haynes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 542 bytes
Desc: not available
More information about the fedora-list