home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / shell / 3610 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  584 b 

  1. Path: sparky!uunet!mcsun!uknet!pyrltd!saturn!dave
  2. From: dave@tetra.co.uk (David Sussman)
  3. Newsgroups: comp.unix.shell
  4. Subject: Korn shell and file descriptors
  5. Message-ID: <1548@tetra.co.uk>
  6. Date: 25 Aug 92 09:43:57 GMT
  7. Organization: Tetra Ltd., Maidenhead, UK
  8. Lines: 16
  9.  
  10.  
  11. I have an interesting Korn Shell problem.  I have a script containing:
  12.  
  13.     echo stream 1 >&1
  14.     echo stream 2 >&2
  15.     echo stream 3 >&3
  16.     echo stream 4 >&4
  17.  
  18. Under the Bourne Shell this works ok, but the Korn Shell produces:
  19.  
  20.     stream 1
  21.     stream 2
  22.     ./ksh[3]: 3: bad file unit number
  23.     ./ksh[4]: 4: bad file unit number
  24.  
  25. Why?
  26.