plan9port/bin/psu
2005-01-17 21:27:59 +00:00

22 lines
192 B
Bash
Executable file

#!/bin/sh
flag=''
if [ "x$1" = "x-a" ]
then
flag=-a
shift
fi
case $# in
0)
user=$USER
;;
1)
user=$1
;;
*)
echo 'usage: psu [-a] [user]' 1>&2
exit 1
esac
9 ps $flag | grep "^$user "