]> git.lizzy.rs Git - plan9front.git/blob - rc/bin/psu
remove ipv6on, update ipconfig(8)
[plan9front.git] / rc / bin / psu
1 #!/bin/rc
2 # psu - ps for just one user
3 rfork e
4 flags=()
5 while (! ~ $#* 0 && ~ $1 -*) {
6         flags = ($flags $1)
7         shift
8 }
9
10 # sed -n p rather than grep so that we get buffered writes.
11 # this is a huge difference in drawterm.
12 switch($#*){
13 case 0
14         ps $flags | sed -n '/^'$user' /p'
15 case 1
16         ps $flags | sed -n '/^'$1' /p'
17 case *
18         echo Usage: psu '[ps-flags] [ user ]' >[1=2]
19         exit usage
20 }