I have a written a script to start my services one by one. After each service finish, it should execute the next command, and wait until first command executes for that I have given this command:wait_for Server started in RUNNING modewait_for socket listener started on portBut it is not taking this logicwait_for() {    res=0    while [[ ! $res -gt 0 ]]    do        res=$(tail -5 $START_LOG | fgrep -c $1)        sleep 5    done}
Executing commands consecutively based on log output
shell