aboutsummaryrefslogtreecommitdiff
path: root/bin/psu
diff options
context:
space:
mode:
Diffstat (limited to 'bin/psu')
-rwxr-xr-xbin/psu23
1 files changed, 23 insertions, 0 deletions
diff --git a/bin/psu b/bin/psu
new file mode 100755
index 00000000..da6d8d45
--- /dev/null
+++ b/bin/psu
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+flag=''
+if [ "x$1" = "x-a" ]
+then
+ flag=-a
+ shift
+fi
+
+user=`whoami`
+case $# in
+0)
+ user=`whoami`
+ ;;
+1)
+ user=$1
+ ;;
+*)
+ echo 'usage: psu [-a] [user]' 1>&2
+ exit 1
+esac
+
+ps $flag | grep "^$user "