[ale] who is the fastest bash scripter?

Geoffrey esoteric at 3times25.net
Wed Feb 26 11:34:17 EST 2003




Jason Day wrote:
> On Tue, Feb 25, 2003 at 08:05:00PM -0500, David S. Jackson wrote:
> 
>>How about just using zgrep instead of calling tar or gunzip or whatever?
>>
>>zgrep -H <classname> *.jar
> 
> 
> Unfortunately, that won't work.  The 'z' commands (zgrep, zcat, zless,
> zmore, ...) only uncompress files that were compressed with zlib, which
> is what gzip uses.  Jar files use PKZip compression, an entirely
> different scheme.
> 
> On the other hand, grep <classname> *.jar works.

Okay, I've forgotten the original purpose of the excersize, but someone 
correct if I'm wrong.  If all you're trying to do is locate the jar file 
a classfile is contained in, what's wrong with:

jar -tf foo.jar classname.class

If there's a number of jar files then:

for jf in *.jar;do

jar -tf $jf classname.class > /dev/null && print $jf
done

Or, was the intent to search the actual source code for a classname 
contained within???


> 
> Jason

-- 
Until later: Geoffrey		esoteric at 3times25.net

The latest, most widespread virus?  Microsoft end user agreement.
Think about it...

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list