Commit 8613c5d2 authored by PkSM3's avatar PkSM3

zearcher updated

parent 1933f1a6
......@@ -25,18 +25,30 @@ function testing {
done
}
#Searching for the word "Magic"
# Usage:
# ./zearcher.sh "extension" "the query"
function test2 {
iter=`find . -name '*.js' -print`
extension=$1
query=$2
# echo "lala $extension , $query"
iter=`find . -name "*.$extension" -print`
counter=0
for f in $iter
do
filename=`echo $f | sed s/"\.\/"//g`
variable=`cat $filename | grep "MultipleSelection"`
variable=`cat $filename | grep "$query"`
if [[ "$variable" != "" ]]
then
echo $filename
counter=$((counter + 1));
fi
done
if [ $counter -eq 0 ]
then
echo "Nothing found. Die."
fi
}
test2
test2 $1 $2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment