home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.24 / text0069.txt < prev    next >
Encoding:
Text File  |  1991-09-03  |  680 b   |  23 lines

  1. Submitted-by: march@cs.uiuc.edu (Steve March)
  2.  
  3. The best I've been able to do from the shell (ksh) is ..
  4.  
  5. export HOSTNAME=$(hostname || uname -n)
  6.  
  7. The first probably maps into the gethostname(2) and the second to uname(2).
  8. In my experience, uname(2) is more portable.
  9.  
  10. Hope this is helpful.
  11.  
  12. -Steve
  13.  
  14. ===============================================================================
  15. Steve March                            (H) (217)328-5176/328-5230  (W) 333-7408
  16. Domain: march@cs.uiuc.edu             Path: {uunet|convex|pur-ee}!uiucdcs!march
  17. "Time and space are modes by which we think and not conditions in which
  18.  we live."  - Albert Einstein
  19.  
  20.  
  21. Volume-Number: Volume 24, Number 70
  22.  
  23.