Mercurial > hg > config
view bin/example/pid.sh @ 759:f632a9850bb8
lookie, i can has x platform
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Wed, 16 Sep 2015 15:09:19 -0700 |
parents | f8813ed3d015 |
children |
line wrap: on
line source
#!/bin/bash PID=$$ 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}