Sending text to standard input from a Windows console application

I am trying to write a .bat file to automate some shell commands. Most of the commands are simple, and I can just put them in a batch file directly, but there is one command that, instead of taking command line parameters, expects you to type the desired parameters using "standard input". I'm not quite sure what that means. Can someone tell me how to do this? The text I would like to enter is the contents of one of the files in the directory: "options.txt", which I want to combine with the variable inside the batch file "$ (additional features)".

Make sense?

+5
source share
1

.bat - echo , .

@echo foo > bar.txt
@echo if you need multiple lines >> bar.txt

the_cmd < bar.txt

-

copy myfile.txt bar.txt
@echo %variable% >> bar.txt

, $(), , makefile, . make , .

+7

All Articles