Hi,
I'm trying to find a line containing the text "foo" and replace that whole line (i.e., the rest of the line as well) with the text "bar". Under Linux, I'm able to use sed like so:
Code:
sed -i'.bak' -e"/foo/ c\
bar
"
Under OS X, however, I get the error
Code:
sed: 1: "/foo/ cbar": command c expects \ followed by text
The Linux testing was done on Gentoo with sed 4.1.5, while the Mac OS is version 10.5.7 (not sure how to get the sed version, as it doesn't have a --version/-v flag or anything), if that's relevant.
Thanks!