Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merging Text between files

Status
Not open for further replies.

Blivo

Technical User
May 2, 2005
9
US
How would I take all the text from different files and merge them together so that they show up under each other?
 
What do you want to do ?
Something like this ?
paste -d'\n' file1 file2

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Something exactly like that I would say. Thanks
 
Actually, I just did some more tests on it and no. for some reason it seems to merge them into the middle of each other. Also, with some of the files, it won't work. Could it be because of the file name or the contents of the file itself?
 
I would like it to come out like this

File1:

AAA
BBB
CCC

File2:
DDD
EEE
FFF

Merged File:
AAA
BBB
CCC

DDD
EEE
FFF
 
cat File1 File2 > Merged

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top