I have a text file like
aaaa
aaaa
aaaa
aaaa
....
I use the sed to replace the string of "aaaa" with "bbbb", the command is
sed -i "/aaaa/c\bbbb" mytextfile
but I want the sed to stop processing when it finds first match.The output will be like this
bbbb
aaaa
aaaa
aaaa
....
Anybody tells how to do that?