home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!bnr.co.uk!uknet!bcc.ac.uk!link-1.ts.bcc.ac.uk!ucgadkw
- From: ucgadkw@ucl.ac.uk (Dominik Wujastyk)
- Newsgroups: comp.os.os2.misc
- Subject: CMD.EXE special character interpretation (^&, etc.)
- Keywords: Mattes CMD.EXE command line
- Message-ID: <1993Jan02.124400.9233@bas-a.bcc.ac.uk>
- Date: 2 Jan 93 12:44:00 GMT
- Organization: Bloomsbury Computing Consortium
- Lines: 57
-
- Some time back, I was having trouble constructing OS/2
- command-line strings which had "&" in them. I searched
- the online refs, manuals, and found no help. Finally,
- Eberhard Mattes kindly sent me the following message,
- which might be of more general interest.
-
- [Timothy - since this stuff isn't in any of the distributed
- documentation, perhaps it could go in the FAQ?]
-
- -------------------------------------------------------------------
- Date: Sun, 6 Sep 92 17:33:03 +0200
- To: ucgadkw@uk.ac.ucl
- Subject: emTeX under OS/2 - help?
-
- [...]
-
- Information about ^ and & and ( and ) and all the other special
- characters in the command line is neither in the manual nor in the
- online documentation.
-
- I try to give a summary:
-
- & unconditional sequential execution of programs
- && conditional sequential execution (`AND')
- | pipe
- || conditional sequential execution (`OR')
- >file redirection of handle 1 to file
- >>file redirection of handle 1 to file (appending)
- >&m redirection of handle 1 to handle m
- n>file redirection of handle n to file
- n>>file redirection of handle n to file (appending)
- n>&m redirection of handle n to handle m
- <file redirection of file to handle 0
- n<file redirection of file to handle n
- ( command ) grouping
- ^ escape special character
-
- (n=0...9, m=0...9)
-
- Examples:
-
- (make 2>&1) > make.out
-
- Run make and write both stdout and stderr to make.out.
-
- prog1 && (prog2 || prog3)
-
- If prog1 succeeds, run prog2 (and prog3, if prog2 fails)
-
- echo ^^^>
-
- Display ^>
-
- [...]
- -------------------------------------------------------------------
-
- Dominik
-