I have a large text file that needs some changes. I need to do this by first locating lines that have a particular common string, and then editing the line directly after that. So for example, if I ran this
# grep -A1 important_string gianttextfile.txt important_string change_this
I would want to first locate
important_string, and then modify
change_this to be something else, several times throughout a document. I cannot just modify all
change_this entries because many of them need to stay as they are, it's just the ones following this particular string that I need to change.
What would be the best way to accomplish this?