LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   merge file1 at end of line file2 (https://www.linuxquestions.org/questions/linux-newbie-8/merge-file1-at-end-of-line-file2-797240/)

porkcharsui 03-23-2010 04:44 AM

merge file1 at end of line file2
 
Hello,

Can anyony give me a hint on how I can merge the data from file1(data per line) to the end of line of file2. So what I mean is, I want to add every line from file1 to the end of the corresponding line of file2.

I'll be gratefull for any help you can give me!

Regards,
PorkCharSui

evo2 03-23-2010 04:50 AM

Not sure I understand what you are asking.

Here is an answer to one interpretation
Code:

cat file1 >> file2
Here is an answer to another interpretation
Code:

mv file2 file2.tmp
paste file2.tmp file1 > file2

Evo2.

porkcharsui 03-23-2010 05:27 AM

Thanks Evo!!!

The second interpretation was exactly what I was looking for! Paste is the cmd I needed.


All times are GMT -5. The time now is 11:03 PM.