How can I append a command's output to multiple files?
For example, the command man ls
, I need to append its output into three different text files using one command in terminal.
You can use tee
command .
Command :
man ls | tee -a file1 file2 file3
Result : man ls
command's output will be appended into file1 file2 file3
For more info : man tee
Reference : Site
echo "Hello World" > {file1,file2,file3}
but using tee always works too
man ls
? I'm almost sure that nobody will delete that manual page...