Add quotes for variables in replace
This commit is contained in:
parent
f908cc9b8f
commit
74fd8a362e
1 changed files with 3 additions and 3 deletions
|
@ -4,9 +4,9 @@
|
||||||
#
|
#
|
||||||
# replace foo bar **/*.rb
|
# replace foo bar **/*.rb
|
||||||
|
|
||||||
find_this=$1
|
find_this="$1"
|
||||||
shift
|
shift
|
||||||
replace_with=$1
|
replace_with="$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
ag -l --nocolor $find_this $* | xargs sed -i '' "s/$find_this/$replace_with/g"
|
ag -l --nocolor "$find_this" $* | xargs sed -i '' "s/$find_this/$replace_with/g"
|
||||||
|
|
Loading…
Add table
Reference in a new issue