sed -i "s/filename_prd/filename_dev/g" filename_dev.sql
But on Mac OS this what I had to do:
sed 's/filename_prd/filename_dev/g' ./filename_prd.sql > ./filename_dev.sql
Evidently the "-i" is not required in Mac, the command being sent to sed must be in single quotes and not double, and the output of sed goes to std_out so it needs to be saved to another file. (You can save it to the file itself but I prefer to be conservative about this.)
No comments:
Post a Comment