0

This is not a question about Java source code. This is a question about appending the result of running a Java program from command line with bash or cmd and appending its standard output to a text file.

It is possible to redirect the standard output to a text file. This is destructive and overwrites any previous file with the same name.

java HelloWorld > hello.txt

Is it possible to append the final result so that the contents of hello.txt are not overwritten every time the program is run?

I looked in man java and did not see anything there about appending.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130
ThisClark
  • 14,352
  • 10
  • 69
  • 100

0 Answers0