# HG changeset patch # User Jeff Hammel # Date 1399414720 25200 # Node ID f8813ed3d0158315763ef8ccc87afe115ce885b8 # Parent df9d5093573ee2ae923b4864b24052432a48269f STUB: bin/example/pid.sh diff -r df9d5093573e -r f8813ed3d015 bin/example/pid.sh --- a/bin/example/pid.sh Tue May 06 15:12:03 2014 -0700 +++ b/bin/example/pid.sh Tue May 06 15:18:40 2014 -0700 @@ -4,4 +4,13 @@ echo "The PID of this shell script is ${PID}" ps auxwww | grep ${PID} + +if which tempfile +then + PIDFILE=$(tempfile) + echo "PID file: ${PIDFILE}" + echo ${PID} > ${PIDFILE} + kill $(cat ${PIDFILE}) +fi + kill ${PID} \ No newline at end of file