tags:

views:

76

answers:

2

I would like to repeat each line's content of a file, any quick solution using sed.

supposed the input file is
abc
def
123

The expected ouput is:
abcabc
defdef
123123

Thank you for your help

+1  A: 
sed 's \(.*\) \1\1 ' infile
radoulov
A: 
sed 'h;G;s/\n//' file.txt
Dennis Williamson