Answers for "echo or cat into multiple files"

0

echo or cat into multiple files

# Use tee to read from standard input and write to standard output and files.
echo "hello" | tee -a file1 file2

or 

# can flip it around for heredoc: 
tee -a aaa bbb ccc << EOF contents ... EOF
Posted by: Guest on October-09-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language