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
total number of files which have "aaa" in files whose names are File*_bbb* sudheshnaiyer UNIX for Dummies Questions & Answers 1 08-16-2007 11:34 AM
[Urgent]how to print the file names into a txt file??? kumarsaravana_s Shell Programming and Scripting 15 03-12-2007 12:32 AM
Moving files and changing names muneebr UNIX for Dummies Questions & Answers 5 11-20-2006 06:42 AM
Unix ISO's for FTP, I've searched the other Posts killrazor UNIX for Dummies Questions & Answers 3 10-11-2002 07:05 AM
Need to print file names in a certain date range using ls Shamwari UNIX for Dummies Questions & Answers 2 10-08-2001 04:14 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 12-24-2007
Registered User
 

Join Date: Aug 2005
Posts: 229
How to print the files names that being searched

Hello all
Im doing search in jar files using this oneLiener :
f
Code:
ind . -name "*.jar"  -print -exec jar -tvf {} \; | grep -n \/someClassName.class
but I also will like to see the jar file names that the grep succeed the search
What I need to add to this command so it will give the file names?
Reply With Quote
Forum Sponsor
  #2  
Old 12-25-2007
Registered User
 

Join Date: Oct 2007
Location: USA
Posts: 570
Quote:
Originally Posted by umen View Post
Hello all
Im doing search in jar files using this oneLiener :
f
Code:
ind . -name "*.jar"  -print -exec jar -tvf {} \; | grep -n \/someClassName.class
but I also will like to see the jar file names that the grep succeed the search
What I need to add to this command so it will give the file names?
Code:
find . -name "*.jar"  -print -exec jar -tvf {} \; | grep -n -l \/someClassName.class
Reply With Quote
  #3  
Old 12-25-2007
Registered User
 

Join Date: Aug 2005
Posts: 229
hello and thanks for the reply
but i have problem here
when i run this commnad with the "-l" switch im getting :
"(standard input) " as massage , i have no idea what it means .
when i remove the "-l" switch im getting the maches but without the file name
by the way im using cygwin .
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 07:02 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