Linux
sed -i "s/old/new/g" /path/to/file
Mac
sed -i "" "s/old/new/g" /path/to/file