3
rated 0 times
[
3]
[
0]
/ answers: 1 / hits: 3142
/ 2 Years ago, sat, april 2, 2022, 1:14:40
Want to search a file inside a set of jar files. How this can be done in ubuntu termianl?
More From » command-line
Want to search a file inside a set of jar files. How this can be done in ubuntu termianl?
I understand that you want to look for a specific file -- and not search for a string within a file in the .jar archive.
Another option, without zipgrep, just with zip, sed and friends. Suppose you want to look through jar files in the current directory:
for i in *.jar ; do unzip -l "$i" | sed "s?.*?$i: &?" ; done | grep "filetofind"