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-08-13 06:06
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » dir/b a.txt | del pipe doesn't work, please advise! Thanks. View 1,065 Replies 3
Original Poster Posted 2007-08-24 20:11 ·  中国 北京 阿里云BGP数据中心
初级用户
Credits 24
Posts 8
Joined 2007-08-24 19:15
18-year member
UID 95766
Gender Male
Status Offline
As the title says, isn't a pipe supposed to pass the result of the first command to the second command? Going by that, giving a.txt to del
shouldn't be wrong, right?
Floor 2 Posted 2007-08-25 09:59 ·  中国 北京 阿里云BGP数据中心
初级用户
Credits 24
Posts 8
Joined 2007-08-24 19:15
18-year member
UID 95766
Gender Male
Status Offline
I found the answer. Looking at the documentation, it seems these two commands run at the same time, so the latter command can't receive the former command's output result. It only works when the second one is waiting for input.
Floor 3 Posted 2007-08-25 10:10 ·  中国 山东 济宁 兖州区 联通
钻石会员
★★★★★
Credits 10,056
Posts 3,041
Joined 2002-11-11 00:00
23-year member
UID 223
Gender Male
Status Offline
“ dir/b a.txt | del ” has no meaning at all, because the del command does not read data from standard input.
简单就是美
Floor 4 Posted 2007-08-27 08:47 ·  日本 FUJITSU公司
初级用户
Credits 43
Posts 19
Joined 2007-08-19 08:47
18-year member
UID 95320
Gender Male
Status Offline
Forum Jump: