21 lines
273 B
Bash
21 lines
273 B
Bash
|
|
#!/usr/bin/bash
|
||
|
|
|
||
|
|
if [ "$#" -lt 1 ] || [ "$#" -gt 3 ]; then
|
||
|
|
echo "Usage: $0 list file.zip"
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
|
||
|
|
LIST=$1
|
||
|
|
FILE=$2
|
||
|
|
|
||
|
|
# process input file
|
||
|
|
while IFS= read -r line; do
|
||
|
|
echo try: $line
|
||
|
|
if unzip -p $line $FILE ; then
|
||
|
|
echo FOUND : $line
|
||
|
|
fi
|
||
|
|
done < "$LIST"
|
||
|
|
|
||
|
|
exit 0
|
||
|
|
|