Last active
March 22, 2024 05:26
-
-
Save hardianlawi/55be01428da52271483b5fdc985e0850 to your computer and use it in GitHub Desktop.
Bash script to download images based on a list of urls
This file contains 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
# This script is used to download images given a list of urls | |
imgdir=$1 | |
urllist=$2 | |
mkdir $imgdir | |
while read p; | |
do | |
wget $p -P $imgdir | |
done < $urllist | |
echo "Finish downloading" | |
# deduplicate the urls and remove the headers in the file | |
# use the command `nohup bash download_images.sh img/ urllist.txt &> download.log &` to run it on the background |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment