tj@mks.UUCP (03/13/87)
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