#!/bin/sh dir=$1 class=$2 echo Searching for $class in $dir for file in `find $dir -name '*.jar'` do echo -n Checking $file... result=`jar tvf $file | grep $class` if [ "$result" ] then echo found! jar tvf $file | grep $class else echo fi done