Replace text in place (macOS)

Terminal
sed -i '' 's/old/new/g' <file>
DestructivemacOS