user1279914
user1279914

Reputation: 185

Showing the input when using redirection operators in command prompt

Hopefully this is an easy/dumb question.

I am redirecting program input and output to text files in Windows.

Example:

program.exe < in.txt > out.txt

But the text that is inputted from the input file isn't shown in the output file (or screen when not redirecting the output). Is there any way to show it easily? I've tried google but I can't find anything.

Upvotes: 0

Views: 269

Answers (1)

didster
didster

Reputation: 882

Depends what program.exe is doing with the input. You will only see it in the file (or the console if you dont redirect) if program.exe actually writes its output to standard out. If you need to send the input multiple ways (such as to the program and also the screen at the same time) and the program itself doesnt actually make provision for this, you need something like tee - or a real shell like bash.

Upvotes: 1

Related Questions