I want to replace all occurrences of {{password}} or {{ password }} or {{password }} in files with some string using sed i am able to remove with know number of spaces , but could not remove all combinations.
i could replace using , but not all combinations
sed -i -e "s/{{ password }}/$password/g" test.sql
passwordvariable doesn't contain\or&or the delimiter character which/in the example used above.. see also: stackoverflow.com/questions/29613304/…'s/{{ password }}/'"$password"'/g'to avoid double quotes conflicting with sed command