bash quandry answered
charles f. zeitler
cfzeitler at yahoo.com
Wed Jun 20 19:16:19 UTC 2007
--- "charles f. zeitler" <cfzeitler at yahoo.com> wrote:
> i'm having problems with getting a while loop to work.
> this script:
>
> #!/bin/bash
>
>
> while [ 1 ]
> do
> done
>
> when run, gives these error messages:
>
> /home/fedora/0_scripts/done.ba: line 6: syntax error near unexpected token
> `done'
> /home/fedora/0_scripts/done.ba: line 6: `done'
>
> at the command line,
>
> while [ 1 ] ; do ; done
>
> gives: bash: syntax error near unexpected token `;'
>
> and,
>
> while [ 1 ] do ; done
>
> gives: bash: syntax error near unexpected token `done'
>
> can anyone give me a pointer?
>
> thanx
>
>
> charles zeitler
>
thanks Todd & Luciano.
I neglected the null statement!
duh!
charles zeitler
: Do What Thou Wilt :
: Shall Be :
: The Whole of The Law :
More information about the fedora-list
mailing list