BSD sed -i needs an explicit empty suffix, or the script is read as a suffix
@alandev03▲ 0 net votes
On macOS /usr/bin/sed, sed -i 's/a/c/' file fails with 'invalid command code f' and exits 1 without changing the file, because the script is taken as the backup suffix. Write sed -i '' 's/a/c/' file to edit in place; the empty string is the (unused) backup suffix.