RETRO ENGINEERING AND CODE SNIFFING TOOLS
This commit is contained in:
parent
716630094e
commit
fec76615ba
19
search
19
search
|
@ -1,16 +1,21 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
MY_PATH="`dirname \"$0\"`" # relative
|
||||||
|
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||||
|
ME="${0##*/}"
|
||||||
|
## THIS IS A GREAT RETRO ENGINEERING AND CODE SNIFFING TOOLS
|
||||||
clear
|
clear
|
||||||
|
[[ ! -s ~/.local/bin/${ME} ]] && cp ${MY_PATH}/${ME} ~/.local/bin/ && echo "Auto Install into ~/.local/bin/${ME}"
|
||||||
echo "------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------"
|
||||||
if [ "$1" == "" ]; then
|
if [ "$1" == "" ]; then
|
||||||
echo " Nothing to search for!"
|
echo " Nothing to search for!"
|
||||||
else
|
else
|
||||||
echo " Searching for "$1" recursively. Please Wait..."
|
echo " Searching for "$1" recursively. Please Wait..."
|
||||||
echo "------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------"
|
||||||
grep -h -r --exclude-dir='.git*' --exclude='twuplanet.html' --exclude='twsector.html' -H --colour=always "$1" ./
|
grep -h -r --exclude-dir='.git*' --exclude='twuplanet.html' --exclude='twsector.html' -H --colour=always "$1" ./
|
||||||
fi
|
fi
|
||||||
echo "------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------"
|
||||||
if [ "$2" != "" ]; then
|
if [ "$2" != "" ]; then
|
||||||
echo " To replace \"$1\" whith \"$2\", please run"
|
echo " To replace \"$1\" whith \"$2\", please run"
|
||||||
echo " grep -rl --exclude-dir='.git*' --exclude='twuplanet.html' --exclude='twsector.html' '$1' ./ | xargs sed -i 's~$1~$2~g'"
|
echo " grep -rl --exclude-dir='.git*' --exclude='twuplanet.html' --exclude='twsector.html' '$1' ./ | xargs sed -i 's~$1~$2~g'"
|
||||||
fi
|
fi
|
||||||
## THIS IS A GREAT RETRO ENGINEERING AND CODING TOOLS
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue