I have a function within a bash script.
closing )
$CMD_POS open0stat
status=$(cat /opt/cpu/hold/strstat)
if [[ "${status}" = "C " ]]; then
log "Precheck Closing:\tALLOWED\tStore Status '${status}'"
return
else
err "Precheck Closing:\tDENIED\tStore Status '${status}'"
fi
;;
There are some variables here but they are pretty self explanatory. Let me know if you need me to define anything.
Currently, if my script comes across an 'err' it exits, and cleans. I'm wanting to change that, so it continuously checks for that status to = C, until it does, and then move on.
How can i loop function, until the condition is met?