Path: utzoo!utgpu!watmath!mks!alex From: alex@mks.UUCP (Alex White) Newsgroups: comp.sys.ibm.pc Subject: Re: MS-DOS puzzle #1 Keywords: stderr stdin stdout command.com Message-ID: <828@mks.UUCP> Date: 26 Apr 89 12:49:36 GMT References: <6893@bsu-cs.bsu.edu> <2936@ihuxy.ATT.COM> <2535@maccs.McMaster.CA> <10309@ihlpb.ATT.COM> Reply-To: alex@mks.UUCP (Alex White) Organization: Mortice Kern Systems, Waterloo, Ontario, Canada Lines: 19 In article <10309@ihlpb.ATT.COM> psfales@ihlpb.ATT.COM (Fales) writes: >In article <2535@maccs.McMaster.CA>, cs3b3aj@maccs.McMaster.CA (Three More Exams) writes: >Score one more for the MKS toolkit. I never realized that it could do this, >until someone pointed it out recently, but I just tried it and it works: >you can redirect stderr, stdprn (and presumably stdaux) from the MKS shell, >using exactly the the same syntax you would on a *NIX system. Actually, you can even better than this. Since nobody actually ever uses, or cares about stdprn or stdaux, my profile.ksh file starts with: exec 3<&- exec 4<&- which CLOSES stdprn and stdaux, leaving all programs with an extra 2 file descriptors. Yes, I agree, its a grotesque non-intuitive command to use. However, it is useful. You can also do things like exec 2>errors and then all error messages after that point would go to the file `errors'.