This works with GNU sed, but not on OS X:
sed -i -e 's/foo/bar/' target.filesed -i'' -e 's/foo/bar/' target.file
This works on OS X, but not with GNU sed:
sed -i '' -e 's/foo/bar/' target.file
On OS X you
- can't use
sed -i -e
since the extension of the backup file would be set to-e
- can't use
sed -i'' -e
for the same reasons—it needs a space between-i
and''
.