Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!cwruecmp!hal!ncoast!tdi2!brandon From: brandon@tdi2.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: stupid COMMAND.COM (really I/O redirection) Message-ID: <148@tdi2.UUCP> Date: Wed, 18-Mar-87 11:57:33 EST Article-I.D.: tdi2.148 Posted: Wed Mar 18 11:57:33 1987 Date-Received: Sun, 22-Mar-87 22:16:46 EST References: <2091@ncoast.UUCP> <409500003@prism> <2986@iuvax.UUCP> <12572@watnot.UUCP> <2438@dalcs.UUCP> <134@phoenix.PRINCETON.EDU> Reply-To: brandon@tdi2.UUCP (Brandon Allbery) Followup-To: comp.sys.ibm.pc Organization: Tridelta Industries, Inc., Mentor, OH Lines: 36 Quoted from <134@phoenix.PRINCETON.EDU> ["Re: stupid COMMAND.COM (WAS: DOS enviroment size)"], by rjchen@phoenix.PRINCETON.EDU (Raymond Juimong Chen)... +--------------- | In article <2438@dalcs.UUCP> dalegass@dalcs.UUCP writes: | > ...I've seen the source code for Aztec C, and redirection is taken care | >of from the program which is executed, and is not a trapping at the DOS | >level. ... | > | >When DOS gives control to a .com or .exe file, it simply passes the whole | >command line to it, and let's it do what it wishes with the info. | >I think, however, that piping '|' *is* intercepted at the DOS level, | >whereas the '>' and '<' redirections are not. | | I scribbled up a quick assembly language program which does an UNWS, | and merely call it with UNWS outfile. My program just reads | everything off stdin and dumps it to stdout. So DOS >does< catch the | ">" and "<" and takes them out. +--------------- Approximate quote from my DOS manual (ITT-DOS 2.11): ``COMMAND.COM strips redirection information from the command line before passing it to the program.'' Presumably, if the redirection information isn't in the program's image of the command line, then COMMAND.COM is doing the redirection (otherwise, *nothing* is!). ++Brandon -- ``for is he not of the Children of Luthien? Never shall that line fail, though the years may lengthen beyond count.'' --J. R. R. Tolkien Brandon S. Allbery UUCP: cbatt!cwruecmp!ncoast!tdi2!brandon Tridelta Industries, Inc. CSNET: ncoast!allbery@Case 7350 Corporate Blvd. INTERNET: ncoast!allbery%Case.CSNET@relay.CS.NET Mentor, Ohio 44060 PHONE: +1 216 255 1080 (home) +1 216 974 9210