Sample Header Ad - 728x90

Placing matching occurrence number to the left side of the occurrence itself

0 votes
2 answers
79 views
I have a file with multiple occurrences of the expression ".mp3". I want the first occurrence to become "1.mp3", the second occurrence to become "2.mp3", and so on. It would be something like awk '/ mp3 / NR' file My file:
line 1
wget .mp3 url
line 2
wget .mp3

....
I haven't got any results
Asked by 7beggars_nnnnm (109 rep)
Sep 9, 2019, 04:19 AM
Last activity: Sep 9, 2019, 08:56 AM