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
1 day 11 hours ago
1 day 14 hours ago
1 day 15 hours ago
1 day 17 hours ago
1 day 18 hours ago
1 day 20 hours ago
1 day 21 hours ago
2 days 13 hours ago
2 days 14 hours ago
2 days 18 hours ago