"foreach" is usually used in C Shell. Use "for" in Bourne/Korn shell. Correct me if I'm wrong. See my script in another reply in this thread.

Daniel Zhang
Jason Williams wrote:

#!/bin/sh

check_jar() {
        echo $1
        jar tvf $1 | grep <filename>
}

foreach i in `ls *.jar`
        check_jar $i


Or something like that...:)

Jason




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Richard O. Hammer
Sent: Wednesday, October 13, 2004 3:15 PM
To: Java Users Group
Subject: [Juglist] jar searching utility


I find myself looking at a directory full of jar files and I want to know which, if any, of these jars contains a particular file, which I know by name. Is there some utility to help me with this?


Thanks
Rich Hammer

_______________________________________________
Juglist mailing list
[EMAIL PROTECTED]
http://trijug.org/mailman/listinfo/juglist_trijug.org




_______________________________________________
Juglist mailing list
[EMAIL PROTECTED]
http://trijug.org/mailman/listinfo/juglist_trijug.org




_______________________________________________
Juglist mailing list
[EMAIL PROTECTED]
http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to