changeset 674:df9d5093573e

PID example
author Jeff Hammel <k0scist@gmail.com>
date Tue, 06 May 2014 15:12:03 -0700
parents 1b8ea91f00a0
children f8813ed3d015
files bin/example/pid.sh
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/example/pid.sh	Tue May 06 15:12:03 2014 -0700
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PID=$$
+
+echo "The PID of this shell script is ${PID}"
+ps auxwww | grep ${PID}
+kill ${PID}
\ No newline at end of file