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.


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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.