Is there a way to merge 2 text files into one (by appending the content of the second right after the first one) in Unix ?

link|improve this question

Not really a merge, you just append one file after another. – Johan Jun 11 '11 at 20:06
feedback

1 Answer

up vote 6 down vote accepted

Assuming bash as shell or bash script...


Append file2 to file1 (keeping file2 in original state):

cat file2 >> file1


Or this (keeping both original files around):

cat file1 file2 > new_merged_file

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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