 <p>As shown by others awk,sed or paste are the best ways of doing this, but.. Lets do some more!</p> <p>bash loop:</p> <pre><code>cat file | while read line ; do echo "$line;$line"; done </code></pre> <p>perl:</p> <pre><code>perl -pe 's/(.*)/$1;$1/' file </code></pre> <p>ruby:</p> <pre><code>ruby -ne 'puts $_.chomp + ";" + $_' &lt; file </code></pre> <p>python:</p> <pre><code>python -c "import sys;[sys.stdout.write(line.rstrip() + ';' + line) for line in sys.stdin]" &lt; file </code></pre> <p>And now I've run out of things</p>