I am writing a bash script in a busybox session.
The script has to initiate an external executable numerous times in sequence in daemonised form then monitor the output.
while read LINE; do
VARIABLEPARAMETER=`echo "$LINE" | sed -e 's/appropriateregex(s)//'`
externalprog --daemonize -acton $VARIABLEPARAMETER -o /tmp/outputfile.txt
until [ "TRIGGERED" = "1" ]; do
WATCHOUTPUT=`tail -n30 /tmp/outputfile.txt`
TRIGGERED=`echo "$WATCHOUTPUT" | grep "keyword(s)"`
if [ -z "$TRIGGERED" ]; then
PROGID=`pgrep externalprog`
kill -2 "$PROGID"
continue
fi
done
done < /tmp/sourcedata.txt
My question is which of the two loops will the continue command be executed against?
The initial while read line, or the subsequent, until triggered?
Please don't get to focused on the actual code I've thrown this together as an example to try to explain this question, the actual code is much more detailed.