You're viewing a comment by raj and its responses.

raj Permalink
November 19, 2010, 22:41

I have a file with contents like:

abcdefg
hijklmn

and I need to have each of the lines repeated so the end result from the above example will be:

abcdefg abcdefg
hijklmn hijklmn

Any help please?

Thanks,

Comment Responses

March 25, 2011, 18:14

hi raj,

echo "srinu" | sed 's/.*/& &/g'

output: srinu srinu

Sam Lachterman Permalink
May 08, 2011, 18:15

awk '{ print $0 " " $0 }' myfile

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the first letter of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.