(I'm sure this has been asked before, but I can only find somewhat-similar questions.)
I have bunch of files, some of which contain the string "foobar". I would like to replace, in each of those files, the occurrences of "foobar" with "baz" - in those files, not in new files or streamed anywhere.
I'd like to specify the filenames on the command-line, i.e.
[me@myhost:/$] magic_replace "foobar" "baz" file1 file2 file3 etc