开发者

BASH script passing stdin input to a program and giving control back to user input

(I looked everywhere for this, perhaps my googling skill is off today)

I have a program that requires a handful of initialization cmds from stdin (and not through arguments). It'd be nice to move those commands into a script so when the script completes I can start keying the real work. So something like:

cat initcmds.txt | myprogram.exe

the problem is that the program (child process) terminates after receiving EOF at th开发者_如何转开发e end of initcmds.txt. How do you do this? (Bash, Korn, cmd.exe, csh, all good)


cat initcmds.txt - | myprogram.exe

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜