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


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

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-15-2005
Registered User
 
Join Date: Sep 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Sponsored Links
    #2  
Old 09-15-2005
Registered User
 
Join Date: Sep 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Sponsored Links
    #3  
Old 09-15-2005
Registered User
 
Join Date: Jan 2005
Posts: 683
Thanks: 0
Thanked 4 Times in 4 Posts
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 01:59 PM..
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to search and append words in the same file using unix scripting file operations gsreeni Shell Programming and Scripting 5 12-06-2011 01:14 AM
Optimised way for search & replace a value on one line in a very huge file (File Size is 24 GB). manishkomar007 Shell Programming and Scripting 7 09-02-2011 10:59 PM
sed help - search/copy from one file and search/paste to another ncwxpanther Shell Programming and Scripting 5 08-21-2011 10:56 AM
To search a file for a specific word in a file using shell script girish.raos Shell Programming and Scripting 8 09-01-2009 06:51 AM
search for the contents in many file and print that file using shell script cdfd123 Shell Programming and Scripting 3 10-07-2007 10:17 PM



All times are GMT -4. The time now is 11:38 AM.