kirby64/rename_sym.sh
2020-10-06 18:30:40 -04:00

16 lines
197 B
Bash
Executable File

#!/bin/bash
shopt -s globstar
if [ "$#" -ne "2" ];
then
echo "usage: $0 old_name new_name"
exit 1
fi
#echo "Replace $1 with $2?"
#read
git grep -rl "$1" | xargs sed -i "s/\b$1\b/$2/g"