Combine two files and put it in .csv file

Hi Freinds

I have two .txt file gem1.txt and gem2.txt,

Sample gem1.txt

abstract (1.0.0)
actionmailer (2.3.5, 2.2.2)
actionpack (2.3.5, 2.2.2)
activerecord (2.3.5, 2.2.2)
activerecord-oracle_enhanced-adapter (1.1.9)
activerecord-sqlserver-adapter (2.3.4)
activeresource (2.3.5, 2.2.2)
activesupport (2.3.5, 2.2.2)
bundler (1.0.7)
capistrano (2.5.5)
cgi_multipart_eof_fix (2.5.0)

gem2.txt also like that

now i want to combine the data of both file and put in third file which is gem.csv

Data shud come like that:: data of one gem.txt file come in first colum of .csv and data of second txt file comes in second colum of .csv file.

I have tried the paste command but data is not column wise but in jumbled format.

You should have a look on the join command ...

paste -d, gem1.txt gem2.txt > gem.txt

will combine the files, with a comma as a delimiter. If any of your files contain commas (grep for comma to see), you have to quote the lines.

can you show file2 and a short example of what output are you expecting?