From 8ac711d01025690a79590f2ab9a36728af128196 Mon Sep 17 00:00:00 2001 From: Rogelio Cedillo Date: Mon, 4 Jul 2016 20:26:30 -0500 Subject: [PATCH] fixing search:replace --- mac-cli/plugins/general | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mac-cli/plugins/general b/mac-cli/plugins/general index 9edf6da..e3572e0 100644 --- a/mac-cli/plugins/general +++ b/mac-cli/plugins/general @@ -283,9 +283,9 @@ elif [ "$fn" == "search:replace" ]; then if [ ! -z "$replaceString" -a "$replaceString" != " " ]; then if [ "$echocommand" == "true" ]; then - echo "${GREEN}LC_CTYPE=C sed -i 's#${GRAY}${searchString}${GREEN}#${GRAY}${replaceString}${GREEN}#g' ${GRAY}${firstParameter}\n\n${NC}" + echo "${GREEN}LC_CTYPE=C sed -i'' -e 's#${GRAY}${searchString}${GREEN}#${GRAY}${replaceString}${GREEN}#g' ${GRAY}${firstParameter}\n\n${NC}" fi - LC_CTYPE=C sed -i 's#'"${searchString}"'#'"${replaceString}"'#g' $firstParameter + LC_CTYPE=C sed -i'' -e 's#'"${searchString}"'#'"${replaceString}"'#g' $firstParameter else "Please specify the string to replace" @@ -313,4 +313,4 @@ elif [ "$fn" == "airplane-mode:off" ]; then # networksetup -setairportpower en1 on # launchctl load -wF /System/Library/LaunchDaemons/com.apple.blued.plist # Switch bluetooth on -fi \ No newline at end of file +fi