cat file1 name1 name2 name3 cat file2 >name3 text text text text >name1 some kind of text cat output >name1 text text text text >name3 some kind of text