I\'m trying to use SED to extract text from a log file. I can do a search-and-replace without too much trouble:
sed \'s/foo/bar/\' mylog.txt
Editor's note: This solution doesn't work on macOS (out of the box), because it only applies to GNU sed, whereas macOS comes with BSD sed.
sed
Capitalize the 'I'.
sed 's/foo/bar/I' file