#!/bin/bash #echo $1 path=$1 serch=$2 opt=$3 # set=x if [[ $path = "" || $serch = "" ]]; then echo "uzage : $0 path patern [ options] "; exit fi echo " $path $serch "; if [[ ! -d $path ]]; then echo "invalid path: [$1]" exit fi if [[ $opt = "" ]]; then opt="-w" fi for s in $(find $path -name '*.jar' 2>/dev/null) do r=$( echo "$s" | grep "jar$") if [[ ! -z $r ]] ; then r=$( unzip -l $s 2>/dev/null | grep $opt ${serch}.class) if [[ ! -z $r ]] ; then echo "$s -> " echo " $r" fi fi done unset