[ale] who is the fastest bash scripter?

David S. Jackson dsj at sylvester.dsj.net
Mon Feb 24 17:54:38 EST 2003


On Mon, Feb 24, 2003 at 02:40:17PM -0500 Michael D. Hirsch <mhirsch at nubridges.com> wrote:
> > you mean
> >
> > 	for i in *.jar; do jar -tf $i| grep <classname>; done
> >
> > ?
> 
> That will work, but you'll never know what jar it was in.  Heh.

Just do a grep -H (if you're using gnu or bsd grep).

for i in *.jar; do tar -tf $i| grep -H <classname>; done

> 
> Try this
> 
> #!/bin/bash
> for i in *.jar; do
> 	jar -tf $i | grep <classname> &> /dev/null
> 	if [ $? -ne 0 ]; then
> 		print $i
> 	fi
> done
> 
> 
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale


-- 
David S. Jackson                        dsj at dsj.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I never forget a face, but in your case I'll make
an exception.
		-- Groucho Marx
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list