aboutsummaryrefslogtreecommitdiff
path: root/bin/psu
blob: 18c8ffb4decaa115477626b847e0aa08021159c8 (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

9 ps $flag | grep "^$user "