]> code.delx.au - monosys/commitdiff
pgrep for OSX
authorJames Bunton <jamesbunton@fastmail.fm>
Wed, 16 Jul 2008 07:40:31 +0000 (17:40 +1000)
committerJames Bunton <jamesbunton@fastmail.fm>
Wed, 16 Jul 2008 07:40:31 +0000 (17:40 +1000)
scripts/pgrep [new file with mode: 0755]

diff --git a/scripts/pgrep b/scripts/pgrep
new file mode 100755 (executable)
index 0000000..f9046cd
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+ps -o pid=,command= | grep "$1" | awk '{print $1;}' | grep -v $$
+