Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:docs:cmd:other:piping [2014/05/24 05:35] – valerius | en:docs:cmd:other:piping [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Piping ===== | ||
| - | |||
| - | You can create a " | ||
| - | |||
| - | |'' | ||
| - | |'' | ||
| - | |||
| - | For example, to take the output of the **SET** command (which displays a list of your environment variables and their values) and pipe it to the **SORT** utility to generate a sorted list, you would use the command: | ||
| - | |||
| - | < | ||
| - | [c:\] set | sort | ||
| - | </ | ||
| - | |||
| - | To do the same thing and then pipe the sorted list to the internal **[[LIST]]** command for full-screen viewing: | ||
| - | |||
| - | < | ||
| - | [c:\] set | sort | list | ||
| - | </ | ||
| - | |||
| - | The **[[TEE]]** and **[[Y]]** commands are "pipe fittings" | ||
| - | |||
| - | Like redirection, | ||
| - | |||
| - | **CMD.EXE** implements pipes by starting a new process for the receiving program instead of using temporary files. The sending and receiving programs run simultaneously; | ||
| - | |||
| - | When you use pipes with **CMD.EXE** make sure you think about any possible consequences that can occur from using a separate process to run the receiving program. | ||




