home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / osr5 / sco / scripts / u < prev    next >
Encoding:
Korn shell script  |  1997-08-26  |  442 b   |  14 lines

  1. #!/bin/ksh
  2. # @(#) u.ksh 1.0 95/10/24
  3. # 95/10/24 john h. dubois iii
  4. set -A u $(who -q)
  5. # get rid of '# users=n'
  6. unset u[${#u[*]}-1] u[${#u[*]}-2]
  7. # sort userlist
  8. set -s -A u -- "${u[@]}"
  9. # print usernames with fixed field with; this will also end up column-aligned
  10. # on an 80 column display with linewrap on, while still having the single-line
  11. # output format for the sake of things that read 1 line from u
  12. typeset -L9 u
  13. print -r -- "${u[*]}"
  14.