[ale] who is the fastest bash scripter?

Jason Vinson jason.vinson at mindspring.com
Mon Feb 24 15:44:37 EST 2003


I think the prize goes to mr. Jason Day.

His script was so much faster (see the subject) than anyone elses  ;)

thanks again,
Jason


-------Original Message-------
From: Jason Day <jasonday at worldnet.att.net>
To: ale at ale.org
Sent: 02/24/03 03:37 PM
To: ale at ale.org
Subject: Re: [ale] who is the fastest bash scripter?

> 
> 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
<a target=_blank
href="http://jasonday.home.att.net">http://jasonday.home.att.net</a>                    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
<a target=_blank
href="http://www.ale.org/mailman/listinfo/ale">http://www.ale.org/mailman/listinfo/ale</a>
> 
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list