Sed Replace only First Occurrence of a String

Posted on September 1, 2017 at 7:08 pm

Replace only the first occurrence of a string of a file:

sed '0,/pattern/s/pattern/replacement/' filename

Other Posts

Updated Posts