aboutsummaryrefslogtreecommitdiff
path: root/bin/psu
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-10-13 18:25:28 +0000
committerrsc <devnull@localhost>2003-10-13 18:25:28 +0000
commit629864f582b3da6517aee2cac55c26cc832d65b6 (patch)
treeb2ccb6a0066032fab46010ed6444a47a79b22e91 /bin/psu
parent771ff2bc058ee7177828e8d2c01fbd9619933784 (diff)
downloadplan9port-629864f582b3da6517aee2cac55c26cc832d65b6.tar.gz
plan9port-629864f582b3da6517aee2cac55c26cc832d65b6.tar.bz2
plan9port-629864f582b3da6517aee2cac55c26cc832d65b6.zip
Some Plan 9 workalikes.
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 "