For ex.
If i have a line in a txt document "text.txt".Now what i want to do is open the file and read the contents.
When it find this "search.selectedEngine" term then it should delete that particular line and replace it with another string ("REPLACED STRING").
And then save the t开发者_如何学Goext document.
It would be great if you could give me the source for this.
sed -E 's/.*search\.selectedEngine.*/REPLACED STRING/g' /PATH/TO/FILE >/PATH/TO/NEW/FILE
This is case sensitive.
精彩评论