File: refactor

package info (click to toggle)
subuser 0.6.2-3
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 4,208 kB
  • sloc: python: 5,201; sh: 380; makefile: 73
file content (9 lines) | stat: -rwxr-xr-x 185 bytes parent folder | download
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