backslash fix
preserving backslashes, that 'sed' stripped away
This commit is contained in:
@@ -40,12 +40,21 @@ else
|
||||
echo "prefs=${prefs}"
|
||||
custState=$(grep -i "browser.uicustomization.state" ${prefs})
|
||||
|
||||
echo ""
|
||||
echo ${custState}
|
||||
echo ""
|
||||
|
||||
# update user.js in the repo
|
||||
# case sensitive replace:
|
||||
# flags: -i edit file in place, c - replace the line
|
||||
# sed -i "/search_string/c replacement_string" ${filename}
|
||||
# case insensitive replace:
|
||||
sed -i "/user_pref(\"browser\.uiCustomization\.state\"/I s/.*/${custState}/" ${trg}
|
||||
|
||||
# move old settings from the target file
|
||||
sed -i '/browser.uiCustomization.state/d' ${trg}
|
||||
|
||||
# add new settings to the target file
|
||||
echo ${custState} >> ${trg}
|
||||
|
||||
more ${trg}
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user