Paste 2 single column files to a single file

Hi,
I have 2 csv/txt files with single columns. I am trying to merge them using paste, but its not working..

output3.csv :

flowerbomb
everlon-jewelry
sofft
steve-madden
dolce-gabbana-watch

output2.csv :

http://www1.abc.com/cms/slp/2/Flowerbomb
http://www1.abc.com/cms/slp/2/Everlon-Jewelry
http://www1.abc.com/cms/slp/2/Sofft
http://www1.abc.com/cms/slp/2/Steve-Madden
http://www1.abc.com/cms/slp/2/Dolce-Gabbana-Watch

when I do:

paste output2.csv output3.csv |head

Here is the output received:

http://wflowerbombcom/cms/slp/2/Flowerbomb
http://weverlon-jewelryms/slp/2/Everlon-Jewelry
http://wsofftacys.com/cms/slp/2/Sofft
http://wsteve-maddenm/cms/slp/2/Steve-Madden
http://wdolce-gabbana-watchlp/2/Dolce-Gabbana-Watch

www1.abc.com is getting replaced by the output3.csv file.
I tried using paste -d, as well and it is not working.

Can you please advice?

Thanks
Ajay

I don't get it. You show us the contents of File1.csv and File2.csv and then you show us a command that pastes two files we haven't seen that produces output that looks suspiciously like File2.csv .

We might be able to help if you would show us the contents of output2.csv and output3.csv and show us the output you are hoping to get (all inside CODE tags).

Sorry about the names:

output2.csv
http://www1.abc.com/cms/slp/2/Flowerbomb http://www1.abc.com/cms/slp/2/Everlon-Jewelry http://www1.abc.com/cms/slp/2/Sofft http://www1.abc.com/cms/slp/2/Steve-Madden http://www1.abc.com/cms/slp/2/Dolce-Gabbana-Watch
output3.csv
flowerbomb everlon-jewelry sofft steve-madden dolce-gabbana-watch

Command that I am using:

paste output2.csv output3.csv

Output that I received:

http://wflowerbombcom/cms/slp/2/Flowerbomb http://weverlon-jewelryms/slp/2/Everlon-Jewelry http://wsofftacys.com/cms/slp/2/Sofft http://wsteve-maddenm/cms/slp/2/Steve-Madden http://wdolce-gabbana-watchlp/2/Dolce-Gabbana-Watch

www1.abc.com is getting replaced by the output3.csv file.
I tried using paste -d, as well and it is not working.

Please let me know for any clarification.

Thanks
Ajay

---------- Post updated 07-09-15 at 12:03 AM ---------- Previous update was 07-08-15 at 11:54 PM ----------

Hi,
Corrected in the initial post. Sorry for the confusion.

Thanks
Ajay

Make sure you have a gap between the bunny ears
You need to specify a delimiter

paste -d  '  '  output2.csv  output3.csv 

This will work with your first file example of one column per file.
Not your second example of one row per file.

I will assume for now the that updated sample files you showed us in post #3 in this thread were some kind of copy and paste error??????

With the renamed sample input files in your updated post #1 in this thread, with the command:

paste output2.csv output3.csv

I would expect to get the output:

http://www1.abc.com/cms/slp/2/Flowerbomb	flowerbomb
http://www1.abc.com/cms/slp/2/Everlon-Jewelry	everlon-jewelry
http://www1.abc.com/cms/slp/2/Sofft	sofft
http://www1.abc.com/cms/slp/2/Steve-Madden	steve-madden
http://www1.abc.com/cms/slp/2/Dolce-Gabbana-Watch	dolce-gabbana-watch

But, if your input files had Windows style line terminators (<carriage-return><line-feed> character pairs) instead of UNIX style line terminators (single <line-feed> (AKA <newline>) characters), then you would get output similar to what you showed us:

http://wflowerbombm/cms/slp/2/Flowerbomb
http://weverlon-jewelry/slp/2/Everlon-Jewelry
http://wsofftbc.com/cms/slp/2/Sofft
http://wsteve-maddencms/slp/2/Steve-Madden
http://wdolce-gabbana-watch/2/Dolce-Gabbana-Watch

So, get rid of the <carriage-return> characters in your input files and everything should be fine. But, of course, since you still haven't shown us what output you are trying to produce, we are all just guessing.

Assuming my guess at your desired output is correct and assuming that you don't have any hard links to the files output[23].csv , the following commands should get rid of the <carriage-return>s for you:

tr -d '\r' < output2.csv > $$.csv && mv $$.csv output2.csv
tr -d '\r' < output3.csv > $$.csv && mv $$.csv output3.csv

and then your paste commands should work.

Thank you. My files had ^M characters in the file and so it didnt work.
After removing the ^M characters, it is working fine now.

Thanks
Ajay