I have a file that I want to find a key word in and enter text 2 lines down.
For example lets say the file i have contains the following words
the cow goes moo
I want to be able to find the word "cow" and enter the text "yay" into the file 2 lines below the word cow.
the cow goes moo yay
I believe this would be done with
sed but cannot get it to work.
Any help is greatly appreciated.