Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!princeton!phoenix!rjchen From: rjchen@phoenix.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: stupid COMMAND.COM (WAS: DOS enviroment size) Message-ID: <134@phoenix.PRINCETON.EDU> Date: Fri, 13-Mar-87 12:50:47 EST Article-I.D.: phoenix.134 Posted: Fri Mar 13 12:50:47 1987 Date-Received: Sat, 14-Mar-87 09:07:32 EST References: <2091@ncoast.UUCP> <409500003@prism> <2986@iuvax.UUCP> <12572@watnot.UUCP> <2438@dalcs.UUCP> Reply-To: rjchen@phoenix.UUCP (Raymond J Chen) Organization: Princeton Univ. Computing and Information Technology Lines: 30 Keywords: DOS substitutions Summary: DOS *does* interpret ">" and "<" when on the command line In article <2438@dalcs.UUCP> dalegass@dalcs.UUCP writes: >> [general discussion on inability to pass various marks of punctuation >> on the command line since they are DOS metacharacters.] > > ...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. > >-dalegass@dalcs 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. I don't know why Aztec C does all that redirection handling, but MIX C (don't laugh) also does the same thing in its startup routine. They do it presumably because MIX C was originally a CP/M compiler, and CP/M does not handle redirection. Perhaps they were too lazy to remove it from their MSDOS version, or maybe they know something we don't. -- -- Raymond Chen, BITNET: (preferably) 6101695@pucc, rjchen@pucc ARPA: rjchen@phoenix.PRINCETON.EDU UUCP: {allegra}!princeton!phoenix!rjchen