Bash script to replace strings within a file