Skip to content

Instantly share code, notes, and snippets.

@hardianlawi
Last active March 22, 2024 05:26
Show Gist options
  • Save hardianlawi/55be01428da52271483b5fdc985e0850 to your computer and use it in GitHub Desktop.
Save hardianlawi/55be01428da52271483b5fdc985e0850 to your computer and use it in GitHub Desktop.
Bash script to download images based on a list of urls
# 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