Easy text merge... need help
I need to take a text file and create each line duplicated...
apple orange pear should become apple apple orange orange pear pear Anyone know what commands I should use off the top of their heads? |
I'm sorry... actually, then need to be on the same line separated by a tab...
apple apple orange orange pear pear much like the join command but without the column to join on. |
Try a variation on this page: http://www.thedumbterminal.co.uk/php...ion=view&id=41
basically match anything s/.*/\1 \1/ replace with itself twice. Not sure about tab, try \t in between \1\1 |
awk '{print $0 "\t" $0}' /path/to/yourfile
jlinkels |
Thanks guys.
|
All times are GMT -5. The time now is 08:21 AM. |