<p>I have a couple of files containing a value in each line.</p>

<p><strong>EDIT :</strong></p>

<p>I figured out the answer to this question while in the midst of writing the post and didn't realize I had posted it by mistake in its incomplete state.</p>

<p>I was trying to do:</p>

<pre><code>paste -d ',' file1 file2 file 3 file 4 &gt; file5.csv
</code></pre>

<p>and was getting a weird output. I later realized that was happening because some files had both a carriage return and a newline character at the end of the line while others had only the newline character. I got to always remember to pay attention to those things.
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­</p>

[{'answer_id': 25229, 'author': 'sparkes', 'author_id': 269, 'author_profile': 'https://Stackoverflow.com/users/269', 'pm_score': 0, 'selected': False, 'text': '<p>you probably need to clarify or retag your question but as it stands the answer is below.</p>\n\n<p>joining two files under Linux</p>\n\n<pre><code>cat filetwo &gt;&gt; fileone\n</code></pre>\n'}, {'answer_id': 25231, 'author': 'Bjorn Reppen', 'author_id': 1324220, 'author_profile': 'https://Stackoverflow.com/users/1324220', 'pm_score': 3, 'selected': True, 'text': '<p>file 1:</p>\n\n<pre>\n1\n2\n3\n</pre>\n\n<p>file2:</p>\n\n<pre>\n2\n4\n6\n</pre>\n\n<pre><code>paste --delimiters=\\; file1 file2\n</code></pre>\n\n<p>Will yield:</p>\n\n<pre>\n1;2\n3;4\n5;6\n</pre>\n'}, {'answer_id': 25236, 'author': 'wilhelmtell', 'author_id': 456, 'author_profile': 'https://Stackoverflow.com/users/456', 'pm_score': 1, 'selected': False, 'text': '<p>I have a feeling you haven\'t finished typing your question yet, but I\'ll give it a shot still.  ;)</p>\n\n<pre><code>file1:  file2:  file3:\n1       a       A\n2       b       B\n3       c       C\n\n~$ paste file{1,2,3} |sed \'s/^\\|$/"/g; s/\\t/","/g\'\n"1","a","A"\n"2","b","B"\n"3","c","C"\n</code></pre>\n\n<p>Or,</p>\n\n<pre><code>~$ paste --delimiter , file{1,2,3}\n1,a,A\n2,b,B\n3,c,C\n</code></pre>\n'}, {'answer_id': 25294, 'author': 'Frank Krueger', 'author_id': 338, 'author_profile': 'https://Stackoverflow.com/users/338', 'pm_score': 0, 'selected': False, 'text': '<p>Also don\'t forget about the ever versatile <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&amp;displaylang=en" rel="nofollow noreferrer">LogParser</a> if you\'re on Windows.</p>\n\n<p>It can run SQL-like queries against flat text files to perform all sorts of merge operations.</p>\n'}, {'answer_id': 25516, 'author': 'Dana the Sane', 'author_id': 2567, 'author_profile': 'https://Stackoverflow.com/users/2567', 'pm_score': 0, 'selected': False, 'text': '<p>The previous answers using logparser or the commandline tools should work. If you want to do some more complicated operations to the records like filtering or joins, you could consider using an ETL Tool (Pentaho, Mapforce and Talend come to mind). These tools generally give you a graphical palette to define the relationships between data sources and any operations you want to perform on the rows.</p>\n'}]
['https://Stackoverflow.com/questions/25225', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1582/']