Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!mks!tj From: tj@mks.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: command.com redirection quoting (WAS: stupid COMMAND.COM) Message-ID: <229@mks.UUCP> Date: Fri, 13-Mar-87 14:36:49 EST Article-I.D.: mks.229 Posted: Fri Mar 13 14:36:49 1987 Date-Received: Sat, 14-Mar-87 06:01:59 EST References: <2091@ncoast.UUCP> <409500003@prism> <2986@iuvax.UUCP> <2438@dalcs.UUCP> Organization: Mortice Kern Systems, Waterloo, Ont. Lines: 23 Keywords: DOS command.com redirection quoting Summary: command.com does redirection and sloppy quoting In article <2438@dalcs.UUCP>, dalegass@dalcs.UUCP (Dale Gass) writes: > 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. DOS 2.0 through 3.2 have command.com doing redirection and piping, using `<' `>' `|', which therefore do not appear in the command tail. However, quoting (with `"') is supported to get these characters to appear in the command tail, but the `"'s are NOT stripped. This is not particularly useful to programs using the command tail directly, but most C compilers use runtime startup code for preparing (argc, argv) for main() which strip quotes as a side effect (allowing args with embedded ` 's, for example). There are even startups with relic code (from DOS 1?) for doing redirection. If your own program chokes on `"|"' before reaching main(), suspect the startup of excessive ambition. In my experience Mark Williams, Microsoft, and Wizard do not have any problem with quoted [<>|]. -- ll // // ,~/~~\' T. J. Thompson {decvax,ihnp4,seismo}!watmath!mks!tj /ll/// //l' `\\\ Mortice Kern Systems Inc. / l //_// ll\___/ 43 Bridgeport Rd. E., Waterloo, ON, Can. N2J 2J4 O_/ (519)884-2251