Hi,
It's really simple using "sed".
There was a time long ago when I had a similar issue and it double dawned on me that some of the best tools in NIX are the oldest AND best which are "sed" & "awk".
I could write a bash script for you but as I did many years ago before there were great tools to post like this one, just IRC that I found learning how to use "sed" and "awk" on my own has kept the knowledge intact for a few decades.
Hope this helps?
And forgive the bad pun following:
"Just listen to what the man sed".
Paul McCartney & Wings 1976
Recent comments
15 hours 59 min ago
18 hours 55 min ago
20 hours 9 min ago
21 hours 32 min ago
23 hours 10 min ago
1 day 39 min ago
1 day 1 hour ago
1 day 17 hours ago
1 day 18 hours ago
1 day 22 hours ago