中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-11 13:04
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » [Help] Question about the pipe '|'
Printable Version  754 / 3
Floor1 wuxianglin2000 Posted 2009-02-28 04:50
初级用户 Posts 17 Credits 34
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?
Floor2 netbenton Posted 2009-02-28 10:17
银牌会员 Posts 752 Credits 1,916 From 广西
I think a.exe is not receiving standard input
Floor3 xzyx Posted 2009-03-02 00:02
初级用户 Posts 19 Credits 50
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...
Floor4 wuxianglin2000 Posted 2009-03-02 03:44
初级用户 Posts 17 Credits 34
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
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023