Created
November 23, 2023 17:34
-
-
Save Sandra-headscape/19a8ea2fd3c3a4a8c4717dda338d4736 to your computer and use it in GitHub Desktop.
Download list of URLs from a txt file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INPUT=$(find . -name "*.txt") | |
COUNT=1; | |
while IFS= read -r line | |
do | |
curl -O "$line" | |
let COUNT++ | |
done < "$INPUT" | |
echo "count $COUNT" |
count will count all lines (also empties and things that fail to download)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chmod +x download.sh
to make the file executable