Thursday, January 1, 2009

Searching for a class in Multiple jars using shell script

#!/bin/sh

LOOK_FOR="funn/class/name"

for i in `find . -name "*jar"`
do
echo "Searching in jar $i ..."
jar tvf $i | grep $LOOK_FOR > /dev/null
if [ $? == 0 ]
then
echo "==> Class Available in \"$LOOK_FOR\" in $i"
fi
done

No comments:

 
Free Domain Names @ .co.nr!