AWK Command to duplicate lines in a file?

Hi,
I have a file with date in it like:
UserString1
UserString2
UserString3
UserString4
UserString5

I need two entries for each line so it reads like

UserString1
UserString1
UserString2
UserString2

etc. Can someone help me with the awk command please?

Thanks

$ sed p infile
$
$ awk '{print $0"\n"$0}' infile
1 Like
awk 1\;1 infile
2 Likes

This is an awesome one liner!

Thanks pandeesh :wink: