bsd_uname.ep 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. # CHK=0xFD46
  2. #--------------------------------------------------------------
  3. # bsd_uname.ep - get remote username from bsd system
  4. # return: $s0 = username
  5. # $i0 = 1 if success, else 0
  6. #--------------------------------------------------------------
  7. #+:EDITS:
  8. #:01-24-1997-02:37-wht@yuriatin-SOURCE RELEASE 4.00
  9. #:09-11-1996-20:00-wht@yuriatin-3.48-major telnet,curses,structural overhaul
  10. #:11-23-1995-11:20-wht@kepler-source control 3.37 for tsx-11
  11. #:11-14-1995-10:23-wht@kepler-3.37.80-source control point: SOCKETS
  12. #:05-04-1994-04:39-wht@n4hgf-ECU release 3.30
  13. #:09-10-1992-13:59-wht@n4hgf-ECU release 3.20
  14. #:08-22-1992-15:39-wht@n4hgf-ECU release 3.20 BETA
  15. #:07-11-1989-16:55-wht-get cmd became lgets
  16. #:06-28-1989-19:36-wht-use named variables
  17. #:06-25-1989-13:56-wht-new do command syntax
  18. #:06-25-1989-12:33-wht-new if/while syntax
  19. #:06-22-1989-13:30-wht-creation
  20. set $s0='whoami' # send command
  21. do 'oneline' # get $s0=username
  22. ifi $i0 == 0 # we bombed?
  23. {
  24. set $i0=%colors; color red
  25. echo 'bsd_uname: get user name failed'
  26. icolor $i0
  27. $i0 = 0
  28. }