home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / msdos / programm / 8575 < prev    next >
Encoding:
Text File  |  1992-08-17  |  1.4 KB  |  40 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!usc!sdd.hp.com!wupost!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!cleveland.Freenet.Edu!bx304
  3. From: bx304@cleveland.Freenet.Edu (Jeff Epler)
  4. Subject: Re: How can I redirect STDERR into a file ?
  5. Message-ID: <1992Aug17.154904.22461@usenet.ins.cwru.edu>
  6. Sender: news@usenet.ins.cwru.edu
  7. Nntp-Posting-Host: slc5.ins.cwru.edu
  8. Reply-To: bx304@cleveland.Freenet.Edu (Jeff Epler)
  9. Cc: tamari@bimacs.bitnet
  10. Organization: Case Western Reserve University, Cleveland, OH (USA)
  11. References: <4117@bimacs.BITNET>  
  12. Date: Mon, 17 Aug 92 15:49:04 GMT
  13. Lines:       26
  14.  
  15.  
  16. In a previous article, tamari@bimacs.BITNET (tamari zvi) says:
  17.  
  18. >Hi,
  19. >
  20. >  So, the question is how can I redirect these error messages into a file ?
  21. >  (it does'nt have to be the output file.
  22.  
  23. The command CTTY could be used in a batch file.  Its effect is to
  24. redirect input and output, including stderr.  Something like this:
  25.  
  26. ctty errors.txt
  27. %1 %2 %3 %4 %5 %6 %7 %8 %9 <con >con
  28. ctty con
  29.  
  30. This would cause the errors to be redirected to 'errors.txt' but input
  31. and output would still come from the console.
  32.  
  33. If you use 4DOS, the pipe '>&>' directs only stderr to the following
  34. file. '>&' directs both stdout and stderr.
  35.  
  36. -- 
  37. |Jeff Epler               Additions Welcome           c(-8 ;-) >{8-) |
  38. | :) (=( =-] (-= Celebrating the variety of faces =-> :^) {-= |-) (: |
  39. |                                                   Lincoln, Nebraska|
  40.