This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Searching for Zipped file contain a file


Justin,

[ This isn't Cygwin-specific. It's just a GNU grep question. ]


% grep --help
...
   -H, --with-filename       print the filename for each match
...



Randall Schulz
Mountain View, CA USA




At 16:09 2002-05-23, Justin (Home Office) wrote:
>Hi I'm looking for a quick bash script to get a list of all the *.jar 
>files that have the file SAXParser.class in them
>
>find /c -name '*.jar' -exec unzip -l '{}' \; | grep 'SAXParser.class' > 
>/c/results.txt
>
>This nearly does it, but I really want '{}' (ie the jar filename) Any bash 
>gurus have an idea?
>
>
>Thanks, J


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]