annotate bin/example/pid.sh @ 674:df9d5093573e

PID example
author Jeff Hammel <k0scist@gmail.com>
date Tue, 06 May 2014 15:12:03 -0700
parents
children f8813ed3d015
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
674
df9d5093573e PID example
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
1 #!/bin/bash
df9d5093573e PID example
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
2
df9d5093573e PID example
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
3 PID=$$
df9d5093573e PID example
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
4
df9d5093573e PID example
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
5 echo "The PID of this shell script is ${PID}"
df9d5093573e PID example
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
6 ps auxwww | grep ${PID}
df9d5093573e PID example
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
7 kill ${PID}