How can I check CRC from multiple zip files with zip -T
I have a bash script to check CRC of multiple ZIP files:
#! /bin/bash
fileFormat="*.zip"
for entry in `ls $fileFormat`; do
echo $entry >> plikiZip
done
fileName=$(< plikiZip)
for file in "${fileName[@]}"; do
zip -T $file >> wynik.txt
done
I don't know why, byt my wynik.txt contains:
adding: mf.gov.pl_1133863230349.zip (stored 0%)
adding: mf.gov.pl_1133863293588.zip (stored 0%)
adding: mf.gov.pl_1133863748942.zip (stored 0%)
adding: noweprzetargi.msgaz.pl_1133848724906.zip (stored 0%)
adding: swps.pl_1133864085863.zip (stored 0%)
adding: swps.pl_1133864308647.zip (stored 0%)
adding: swps.pl_1133864438352.zip (stored 0%)
test of mf.gov.pl_1133863028119.zip OK
What should I change to have "OK" or "BAD" for all entries instead
addition:
and
(stored X%)
?
+3
source to share