For a uni-assignment I need to write a while-loop for BASH-shell (on windows) that tries different passwords line by line from a given .txt-file and enter them to unzip a given .zip-Archive.
I know how to unzip archives and I know how to echo the .txt-file contents line by line, but can't figure out how to combine them:
#1
while read pw
do echo "$pw"
done < passwords.txt
#2
unzip -P $pw archive.zip