Skip to content

Commit

Permalink
Merge pull request #60 from rgcr/fix_search_replace
Browse files Browse the repository at this point in the history
fixing search:replace
  • Loading branch information
guarinogabriel committed Jul 5, 2016
2 parents 54dfc8c + 8ac711d commit 5bb9c99
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mac-cli/plugins/general
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
fi

0 comments on commit 5bb9c99

Please sign in to comment.