5

In a Bash Script how does the continue command work with embedded loops?

view full story
linux-howto

http://unix.stackexchange.com – 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 don (HowTos)