blob: b337a8c453b99562d441d1f58b5266bb7fe79767 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/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
ps $flag | grep "^$user "
|