How to append end of every line with the line itself

awksed

This is in file.txt:

redcar
bluecar
greencar

Im looking for ways to make it become:

redcar redcar
bluecar bluecar
greencar greencar

I've tried many ways using sed with no luck

Best Answer

Here is a simple solution using paste:

paste -d ' ' file.txt file.txt
Related Question