How can I run a command-line application in the Windows command prompt and have the output both displayed and redirected to a file at the same time?
If, for example, I were to run the command dir > test.txt
, this would redirect output to a file called test.txt
without displaying the results.
How could I write a command to display the output and redirect output to a file in the Windows command prompt, similar to the tee
command on Unix?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…