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