Fixed replace in file function with proper substitution
This commit is contained in:
parent
612e28b16f
commit
e902c9b4c8
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@ replace_in_file() {
|
||||||
|
|
||||||
backup_file "$FILE"
|
backup_file "$FILE"
|
||||||
debug "Replacing $SOURCE to $DESTINATION in $FILE"
|
debug "Replacing $SOURCE to $DESTINATION in $FILE"
|
||||||
SOURCE=$(sed 's@/@\\\/@g' <<< $PATTERN)
|
SOURCE=$(sed 's@/@\\\/@g' <<< $SOURCE)
|
||||||
debug "sed -i 's/$SOURCE/$DESTINATION/g' $FILE"
|
debug "sed -i 's/$SOURCE/$DESTINATION/g' $FILE"
|
||||||
sed -i "s/$SOURCE/$DESTINATION/g" $FILE
|
sed -i "s/$SOURCE/$DESTINATION/g" $FILE
|
||||||
FNRET=0
|
FNRET=0
|
||||||
|
|
Loading…
Reference in a new issue