How to insert a string in a file at specified place?

Hi all,

I want to insert a string in a specified place of a very large file. I am giving an example of the task:

I love football.

Above is a sentence in a file and I want to insert a string "the" between love and football. It is not sure that where this particular line exists. It has to search these two strings and between two, it has to insert the defined string.

Thanks in advance!

Deepak

string=whatever
awk -v insert="$string" '
/I love football/ { sub( "football", insert " football" ) }
 { print }
'

string1="love football"
string2="love the football"
sed 's/'"$string1"'/'"$string2"'/g' filename

Thanks for the quick and effective replies. Really appreciate .

echo "I love football." | sed 's/\(.*love\) \(football.*\)/\1 the \2/'