CT-User
[Top] [All Lists]

[ct-user] Pipe vs redirection

To: <ct-user@contesting.com>
Subject: [ct-user] Pipe vs redirection
From: Robert Hummel <rhummel@cheshire.net> (Robert Hummel)
Date: 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


<Prev in Thread] Current Thread [Next in Thread>