In a shell script i can directly replace text using:
sed -i "s/texta/textb/g" /home/me/myfile
I there any way i can replace an entire line, by only looking for part of it?
ie, say myfile contained"the quick red fox"
"the quick brown fox"
"the quick blue fox"
and i wanted to replace the line with brown in its entirety for "the lazy dog" - the only bit i could search for would be a line containing "brown" but i also want to replace "the quick" and "fox"
any help gratefully appreciated.