using built-in homebrew facility for in-place editing (inreplace)