开发者

Command Prompt - outputting results without overwriting target file

开发者 https://www.devze.com 2023-03-06 23:35 出处:网络
I have a situation where I output results from a CLI program: e.g. input.exe > output.txt Although output.txt already contains text, by default it gets overwritten when using t开发者_JAVA百科he comm

I have a situation where I output results from a CLI program:

e.g. input.exe > output.txt

Although output.txt already contains text, by default it gets overwritten when using t开发者_JAVA百科he command above, how can you write the output to output.txt without overwriting existing data?


Use the >> operator; it appends the output to the existing content of the file.

input.exe >> output.txt
0

精彩评论

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