This discussion is archived
1 Reply Latest reply: Oct 6, 2013 4:33 AM by TommyReynolds RSS

how to handle pid

032ee1bf-8007-4d76-930e-f77ec0dc7e54 Newbie
Currently Being Moderated

nohup retek_tar_and_archive.ksh $MMHOME $MMIN $MMOUT $MMLOG $MMERR $MMTMP $MMHOME/arch &

pid=$$

ps -ef | grep "$pid" > running.log

var=`cat running.log|wc -l`

if [$var -eq 0]

then

echo "Completed"

nohup ./remove.sh

pid=$$

ps -ef | grep "$pid" >> running.log

var=`cat running.log|wc -l`

elif [$var -eq 0]

then

echo "Completed"

else

echo "Running"

fi

how to handle pid because p_id of ./remove.sh is taking the p_id of retek_tar_ans_archive  (batch remove.sh will start after retek_tar_and_archive.ksh) and one more thing we have to start retek_tar_and_archive.ksh  with batch _sagetref  parallelly?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points