Can this be done with Homebrew's `inreplace` function instead of sed?