I can get the count number of files in the zip but unable to exclude any files have extension metadata. How can I count only "pdf" files in the zip. I really appreciate any help you can provide.
unzip -l 0532.zip
742248 05-31-2023 15:19 /pdf/0531/CP-1960-5266M.pdf
4125 05-31-2023 15:19 /pdf/0531/CB-CB-177729.pdf.metadata
1221395 05-31-2023 15:19 /pdf/0531/CB-CB-177729.pdf
4128 05-31-2023 15:19 /pdf/0531/CP-1988-10086.pdf.metadata
243050 05-31-2023 15:19 /pdf/0531/CP-1988-10086.pdf
4125 05-31-2023 15:19 /pdf/0531/R-1978448.pdf.metadata
5735942 05-31-2023 15:19 /pdf/0531/R-1978448.pdf
....... .... ....
....... ..... ....
--------- -------
2152688064 1634 files
I also try this but it fail to exclude "metadata" files. The total count exactly the same.
unzip -l 0532.zip | awk '{count = $2} END{print count}'
1634