Reputation: 11
I have a TXT file that I need to append at the bottom of multiple files. I'm currently using for loop for that :
for file in file1 file2; do cat footer.txt >> $file; done
Any other commands I can use instead?
Upvotes: 0
Views: 351
Reputation: 61
The tee command allows you to apply changes to several files at once.
tee -a file1 file2 < footer.txt
Will do it. The -a tells tee to append on the end.
Upvotes: 3