I have a problem finding a sed script that works when the regex looks exactly the same but I only want to substitute one.
The file looks like this:
something someting something
this
something someting something
something someting something
this
someting something
someting something
someting something
this
someting something
someting something
this
I want to substitute the third “this” to something else. I have tried with:
sed '3,/this.*/s/this.*/something/'
and various similar attempts, but it doesn’t work.
This isn’t easy in sed but awk can do it