Results 1 to 2 of 2
Hello all
Im doing search in jar files using this oneLiener :
Code:
find . -name "*.jar" -print -exec jar -tvf {} \; | grep -n \/Participant.class
but I also ...
- 12-25-2007 #1Just Joined!
- Join Date
- Dec 2007
- Posts
- 7
How to print the files names that being searched
Hello all
Im doing search in jar files using this oneLiener :
but I also will like to see the jar file names that the grep succeed the searchCode:find . -name "*.jar" -print -exec jar -tvf {} \; | grep -n \/Participant.class
What I need to add to this command so it will give the file names?
- 12-25-2007 #2Linux Enthusiast
- Join Date
- Aug 2006
- Posts
- 631
You can place a tee command between the find and the grep command to write the output of the find command to a file:
RegardsCode:find ... | tee -a file | grep -n ...


Reply With Quote