Hi,
I'm not sure if this is possible with awk. I don't know enough perl/python to approach this. It
seems doable with awk but I don't know where to begin.
I have a file in this format:
Code:
5 apple A
3 pear B
1 banana C
2 orange D
I need to repeat the lines based on the variable in the first column so that the above data looks like this:
Code:
apple A
apple A
apple A
apple A
apple A
pear B
pear B
pear B
banana C
orange D
orange D
Any ideas?