Input a procedure number and a mail address.
This script can keep watching the peocedure.
when the procedure terminated, it will send a mai to user.
——————-
#!/bin/bash
echo Procedure Checking: $1
while [ `ps -p $1 | wc -l | sed ‘s/[ t]*//’` -ne “1” ]
do
sleep 3
done
echo “Procedure $1 is terminated.” | mail -s ‘Task terminated notation’ $2