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-11 14:03
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] Question about the pipe '|' View 756 Replies 3
Original Poster Posted 2009-02-28 04:50 ·  中国 福建 厦门 电信
初级用户
Credits 34
Posts 17
Joined 2007-12-29 15:05
18-year member
UID 107123
Gender Male
Status Offline
Under pure DOS, when calling an executable that needs a keypress confirmation. If I press Y according to the prompt, it can execute normally to the end. But when using the pipe command echo Y|a.exe, the program hangs when it reaches the prompt line, and there is no response no matter what I press on the keyboard, but the indicator lights are all normal. Also, this command works correctly with other executable programs. What is causing this?
Floor 2 Posted 2009-02-28 10:17 ·  中国 广东 东莞 电信
银牌会员
★★★
批处理编程迷
Credits 1,916
Posts 752
Joined 2008-12-28 04:30
17-year member
UID 135147
Gender Male
From 广西
Status Offline
I think a.exe is not receiving standard input
精简
=> 个人网志
Floor 3 Posted 2009-03-02 00:02 ·  中国 辽宁 大连 旅顺口区 联通
初级用户
Credits 50
Posts 19
Joined 2008-02-09 22:04
18-year member
UID 110396
Gender Male
Status Offline
If you want a program to support pipes, the program itself needs to create the pipe and connect to the pipe; this has to be implemented when writing the program. In other words, whether a program can use pipes is determined by the program itself...
Floor 4 Posted 2009-03-02 03:44 ·  中国 福建 厦门 电信
初级用户
Credits 34
Posts 17
Joined 2007-12-29 15:05
18-year member
UID 107123
Gender Male
Status Offline
Thanks!
It should be standard input, right? Following the prompt, if I type Y directly, it can continue running, and with another tool that comes with it, I can do it using the pipe command
Forum Jump: