am a new Linux user. I wanted to find the text called “foo” and replaced to “bar” in the file named “hosts.txt.” How do I use the sed command to find and replace on Linux or UNIX-like system?
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.