The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shell script to search for text in a file and copy file imeadows UNIX for Dummies Questions & Answers 9 3 Weeks Ago 06:12 PM
search for the contents in many file and print that file using shell script cdfd123 Shell Programming and Scripting 3 10-07-2007 07:17 PM
how to search string and number in one file and check in the other file knshree Shell Programming and Scripting 9 08-24-2007 01:29 AM
search log file mpang_ Shell Programming and Scripting 1 06-26-2006 09:38 PM
How to search a pattern inside a zipped file ie (.gz file) with out unzipping it senraj01 Shell Programming and Scripting 2 04-26-2006 01:32 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 09-15-2005
Registered User
 

Join Date: Sep 2005
Posts: 16
Jar File Search!

Hi vgersh99,
Iam sorry for that. In future, I will start new threads for different topics. Assuming that we don't know what the name of the jar file, we are searching for is, do we have any way, of finding a string or a file in it. Is there any Unix command for it?

thanks.
Reply With Quote
Forum Sponsor
  #2  
Old 09-15-2005
Registered User
 

Join Date: Sep 2005
Posts: 16
Jar File Search!

Hi vgersh99,
Assuming that we don't know what the name of the jar file, we are searching for is, do we have any way, of finding a string or a file in it. Is there any Unix command for it?

thanks.
Reply With Quote
  #3  
Old 09-15-2005
Registered User
 

Join Date: Jan 2005
Posts: 682
What kind of string are you looking for in a jar file. Are you looking for a class name?

As you find jar files your can use "jar -tvf" to determine its contents.

You then could try someting like this:
Code:
find . -name \*jar -print -exec jar -tvf {} \; | nawk '/YOURSEARCHSTRING/ || /jar/ {print} '

Last edited by tmarikle; 09-15-2005 at 10:59 AM.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 05:23 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0