Is there a way to replace the following two lines after a match is found using sed?
I have a file
#ABC
oneSize=bar
twoSize=bar
threeSize=foo
But I would like to replace the two immediate lines once the pattern #ABC is matched so that it becomes
#ABC
oneSize=foo
twoSize=foo
threeSize=foo
I'm able to do
gsed '/^#ABC/{n;s/Size=bar/Size=foo/}' file
But it only changes the line twoSize not oneSize
Is there a way to get it to change both oneSize and twoSize