[ct-user] Pipe vs redirection

Robert Hummel Robert Hummel <rhummel@cheshire.net>
Wed, 24 Feb 1999 17:58:22 -0500


Redirection is used to change where a program looks for its input or
output, from the DOS standard input device (STDIN) or standard output
device (STDOUT) to a file or a device.

For example, redirect a program that normally writes to STDOUT to a file:

	DIR > dirlist

Redirect a program's input from STDIN to a file.

	DEBUG <cmdlist

Do both:

	DEBUG <cmdlist >result

Piping connect one program's STDOUT to another's STDIN, with DOS creating,
managing, and deleting the temporary file used to store the output. This is
equivalent to the following.

	PROGRAM1 > temp
	PROGRAM2 < temp
	DEL temp



--
Submissions:              ct-user@contesting.com
Administrative requests:  ct-user-REQUEST@contesting.com
WWW:                      http://www.contesting.com/ct/
Questions:                owner-ct-user@contesting.com