Issue
Suppose I have a file with lines
aaa=bbb
Now I would like to replace them with:
aaa=xxx
sed "s/aaa=bbb/aaa=xxx/g"
Now I have a file with a few lines as follows:
aaa=bbb
aaa=ccc
aaa=ddd
aaa=[something else]
How can I replace all these lines aaa=[something]
with aaa=xxx
using sed?
Solution
Try this:
sed "s/aaa=.*/aaa=xxx/g"
Answered By - John Doyle Answer Checked By - Dawn Plyler (WPSolving Volunteer)