#!/bin/bash if [ -z "$1" ]; then echo "$0 " exit fi echo "---------------------" grep $1 *.mxml sp-with-simplesign echo "---------------------" echo -n "OK to remove ? [Y/n]" read x case $x in "Y"|"y"|"") ;; *) exit 1 ;; esac echo if (grep -q $1 sp-with-simplesign); then sed -i "/$1/d" sp-with-simplesign fi grep $1 *.mxml | sed 's/.*: /\1/' | while read file ; do git rm $file done grep $1 *.mxml | sed 's/\(.*\.mxml\): /\1/' | while read file ; do sed -i "/$1/d" $file done git diff