File: refactor

package info (click to toggle)
subuser 0.6.2-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,216 kB
  • sloc: python: 5,204; sh: 380; makefile: 73; javascript: 43
file content (9 lines) | stat: -rwxr-xr-x 185 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
#!/bin/bash
git grep $1
read -r -p "Continue? [y/N] " response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]
then
    git grep -l $1 | xargs sed -i "s/$1/$2/g"
else
    echo "Bye."
fi