Targeted string replacements with sed and AWK
by from on (#51Z78)
Global replacement of A with B might be a mistake unless you're 100% sure that you really, truly want to replace every instance of A with B in the data file. It's much safer to do replacements targeted at particular instances of A, and this post reviews a few strategies for using sed and AWK for targeted string replacements.