Q. How do I replace a string with another string in all files? For example, ~/foo directory has 100s of text file and I’d like to find out xyz string and replace with abc. I’d like to use sed or any other tool to replace all occurrence of the word.
A.sed command is designed for this kind of work i.e. replace strings.
Read the rest of this entry
Q. How do I perform a case-insensitive search using sed under UNIX / Linux? I’d like to match all combination of word – foo, FOO, FoO and so on while replacing or performing other operations.
A. GNU sed and other version does support a case-insensitive search using I flag after /regex/.
Read the rest of this entry