suggest I have a file example as follows:
c
a
b
a
b
d
and I want to change the first occurance of a to e. Then I do this:
sed -i 's/a/e/' example
and all a changed to e.
So is there any way to make sed only replace once within a file?
Thanks.