[plug] Bash "Processing" Script

Jay Turner jturner at bsis.com.au
Fri Jun 11 14:28:26 WST 2004


James said:
> However, there is a fundamental error in using "[ true ]". Remember, `[`
> is just a programme that basically expects a bunch of parameters and
> returns a result of 0 or 1. In the case of "[ true ]", the `[` programme
> is actually evaluating whether the literal text "true" has non-zero
> length -- that has nothing to do with the `true` command! Try
> "[ false ]" -- it will 'succeed' forever!
>
So I would actually need to use
while true
do

or as you showed
while true; do

The man page for bash, I find, is just too hard to read. So I go with
tutorials on the net.
Most of them don't cover advanced things like this... that's where you guys
come in :-)

I think I understand it all now pretty much. Is there a way that we can tell
the 'while' that "it" is now false.
Or is killing the 'while' process the only option (for this scenario
anyway)? (I assume that if there was, Bernd would have suggested it in the
first place..)

Jay





More information about the plug mailing list