0

I need to append one trail record to both the files.

cat file1 >> file2

this appends everything in file1 to file2

My requirement is to append to file1 content to both file2 and file3.

don_crissti
  • 82,805
sai
  • 1

1 Answers1

4

Use tee:

tee -a file2 file3 < file1

tee send its input to each of the files specified as arguments to it. Usually it overwrites, but -a is tells it to append.

muru
  • 72,889