[ale] who is the fastest bash scripter?
Jason Day
jasonday at worldnet.att.net
Mon Feb 24 15:37:29 EST 2003
On Mon, Feb 24, 2003 at 02:20:49PM -0500, Jason Vinson wrote:
> I want to run a bash script that will do the following:
>
> jar -tf *.jar | grep <classname>
>
>
> which will iterate through ./*.jar, and if it finds anything that matches the classname, it will print the jar file name.
I know there have already been several answers posted, but I do this all
the time at work, and have one final suggestion:
for i in *.jar; do unzip -v $i | grep <classname> && echo $i; done
Note the unzip -v, it's an order of magnitude faster than starting a
separate JVM instance for every jar file.
HTH,
Jason
--
Jason Day jasonday at
http://jasonday.home.att.net worldnet dot att dot net
"Of course I'm paranoid, everyone is trying to kill me."
-- Weyoun-6, Star Trek: Deep Space 9
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list