mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
23 lines
207 B
Bash
Executable file
23 lines
207 B
Bash
Executable file
#!/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 "
|