I have many hundred zip files and want to find particular files in them. It is fairly easy the grep for filenames:
find . -name "*.zip" -exec unzip -Z -1 {} \; | grep png
which would give all filenames inside the zip files. E.g.
icons/full/obj16/folder.png
icons/full/obj16/folderType_filter.png
icons/full/wizban/newfolder_wiz.png
But how can I prepend each line with the name of the zip file so I can actually find it? Something like so:
dir1/a.zip:icons/full/obj16/folder.png
dir2/icons.zip:icons/full/obj16/folderType_filter.png
myicons.zip:icons/full/wizban/newfolder_wiz.png