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 the 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With