aboutsummaryrefslogtreecommitdiff
path: root/bin/psu
blob: da6d8d457cbb5198a7b66dda6c7e73411f666cd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 "