4

non alpha characters in sed + making it fast?

view full story
linux-howto

http://www.unix.com – hello, I'm trying to write the fastest sed command possible (large files will be processed) to replace RICH with NICK in a file which looks like this (below) if the occurance of RICH is uppercase, replace with uppercase if it's lowercase, replace with lowercase SOMTHING_RICH_SOMTHING <- replace here hellorichwhatareyoudoing <- do not replace here, forms part of a word SOMTHING.RICH.SOMTHING <- replace here somthing_rich_somthing <- replace here HELLO-RICH-HELLO <- replace here I've used the find operator first to speed up execution how do I alter the sed to achieve the above r (HowTos)