There you go
#!/bin/sh ######################################################################## ## Scans all jar files within a directory (recursively) for a class ## name ## Usage: findClass /tmp/ MyFunnyClass ######################################################################## black='\E[30;47m' red='\E[31;40m\033[1m' green='\E[32;47m' yellow='\E[33;40m' blue='\E[34;40m\033[1m' magenta='\E[35;47m' cyan='\E[36;47m' white='\E[37;47m' alias Reset="tput sgr0" cecho () { local default_msg=" " message=${1:-$default_msg} # Defaults to default message. color=${2:-$black} # Defaults to black, if not specified. echo -e -n "$color" echo -n "$message" Reset # Reset to normal. return } clsln() { fillLine " "; } fillLine() { let tw=$(tput cols)-1; for (( c=0 ; c < $tw; c++)) do echo -n "$1"; done echo -e -n '\r' } echo echo -n Scanning Folder: cecho "$1" $yellow echo -n for Class: cecho "$2" $yellow echo fillLine "." echo for i in $(find $1 -name '*jar'); do clsln; echo -n -e "Scanning :"; cecho $i $blue echo -n -e '\r'; out=$(jar vft $i | egrep $2); if [ "$out" ] then clsln; fillLine "*" echo echo -n -e 'Possble hit in file:' cecho $i $blue echo echo "$out" $red echo fillLine "*" echo echo fi done; clsln; echo;