4
1
How can I take the output of a shell script and place it in a file on the command line?
4
1
How can I take the output of a shell script and place it in a file on the command line?
12
# write to file
sh myscript > out.txt
# append to file
sh myscript >> out.txt
# write both output and stderr to file
sh myscript 2&1>> out.txt
5
$ ./foo >> myoutputfile.txt