1
0

psu 333 B

1234567891011121314151617181920
  1. #!/bin/rc
  2. flags=()
  3. switch($1){
  4. case -*
  5. flags = ($flags $1)
  6. shift
  7. }
  8. # sed -n p rather than grep so that we get buffered writes.
  9. # this is a huge difference in drawterm.
  10. switch($#*){
  11. case 0
  12. ps $flags | sed -n '/^'$user' /p'
  13. case 1
  14. ps $flags | sed -n '/^'$1' /p'
  15. case *
  16. echo Usage: psu '[ps-flags] [ user ]' >[1=2]
  17. exit usage
  18. }