mirror of
https://github.com/ovh/debian-cis.git
synced 2024-12-23 14:35:26 +01:00
Fixed replace in file function with proper substitution
This commit is contained in:
parent
3b9718239d
commit
1bb8c5b387
@ -138,7 +138,7 @@ replace_in_file() {
|
||||
|
||||
backup_file "$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"
|
||||
sed -i "s/$SOURCE/$DESTINATION/g" $FILE
|
||||
FNRET=0
|
||||
|
Loading…
Reference in New Issue
Block a user