China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-27 08:45
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » Question about using redirection operators and the pipe operator? [Help][Original] View 1,107 Replies 2
Original Poster Posted 2004-02-02 00:00 ·  中国 广东 广州 海珠区 电信
初级用户
Credits 106
Posts 2
Joined 2004-02-02 00:00
22-year member
UID 16526
Gender Male
Status Offline
Question about using redirection operators and the pipe operator?


Floor 2 Posted 2004-02-21 00:00 ·  中国 湖北 武汉 电信
初级用户
Credits 130
Posts 7
Joined 2004-02-21 00:00
22-year member
UID 18046
Gender Male
Status Offline
Redirection means changing the system's default input/output target to one defined by the user.
For example:
TYPE A.TXT
will display the contents of A.TXT on the screen.
With redirection:
TYPE A.TXT>B.TXT
then the contents of A.TXT will be sent into B.TXT instead of the screen.
Floor 3 Posted 2004-02-24 00:00 ·  中国 上海 鹏博士宽带
高级用户
★★
zhri
Credits 665
Posts 153
Joined 2004-02-23 00:00
22-year member
UID 18241
Gender Male
Status Offline
Actually, what our friend is talking about is input/output redirection.

Redirection generally uses > and >>. The former will overwrite existing contents, while the latter appends.

| this thing is the pipe.

Its function is to use the output of the program command on the left as the input of the program command on the right.

For example: dir | find ""
This is used to display each subdirectory in the current directory.
Forum Jump: