linux - checking the status of a process and starting another script hwen it finishes in unix -


i'm writing script in it'll check current status of running job , finishes it'll start script within shell script. need idea on that.

#!/bin/ksh  #checking current status of job: ps -ef |grep /spaet1b/work/scripts/loading.ksh if [$? -eq 0 ]; cd /home/ashish/ ./trigger_su.ksh exit 0 fi 

please correct me.

try use pgrep -f

pgrep -f loading.ksh if [$? -eq 0 ]; cd /home/ashish/ ./trigger_su.ksh exit 0 fi 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -