Need help with either sed or awk to acheive the following
file1
-----
In the amazon forest
The bats eat all the time...
mon tue wed they would eat berries
In the tropical forest
The bats eat all the time...
on wed bats eat nuts
In the rain forest
The bats eat all the time...
on mon tue wed bats eat nats
In the above file I would like to look for the words "tropical forest" and then look for the word "wed"
if it exists then
add a "#" in front of the line and add a new line with the text "on mon tue wed they would eat berries"
The result would look like this
In the amazon forest
The bats eat all the time...
mon tue wed they would eat berries
In the tropical forest
The bats eat all the time...
#on wed bats eat nuts
on mon tue wed they would eat berries
In the rain forest
The bats eat all the time...
on mon tue wed bats eat nats
Your input is much appreciated !
Thanks