-
-
Save gustin/11bb4554bcf40b32f28bbb7657febb80 to your computer and use it in GitHub Desktop.
Revisions
-
nerdyworm created this gist
Jul 30, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/bin/bash set -e CURRENT_NAME="CurentName" CURRENT_OTP="current_name" NEW_NAME="NewName" NEW_OTP="new_name" ack -l $CURRENT_NAME | xargs sed -i '' -e "s/$CURRENT_NAME/$NEW_NAME/g" ack -l $CURRENT_OTP | xargs sed -i '' -e "s/$CURRENT_OTP/$NEW_OTP/g" mv lib/$CURRENT_OTP lib/$NEW_OTP mv lib/$CURRENT_OTP.ex lib/$NEW_OTP.ex