Skip to content

Instantly share code, notes, and snippets.

@stevenswafford
Last active May 9, 2022 07:57
Show Gist options
  • Save stevenswafford/e5696dd3d2b417955ede to your computer and use it in GitHub Desktop.
Save stevenswafford/e5696dd3d2b417955ede to your computer and use it in GitHub Desktop.
Download files using curl.
#!/bin/bash
# Script Name : curl_download.sh
# Author : Steven Swafford
# Created : April 2015
# Last Modified :
# Version : 1.0
# Modifications :
# Description : Download files using curl.
# It is all fun and games until someone gets hacked!
# _ _
# _ /|| . . ||\ _
# ( } \||D ' ' ' C||/ { %
# | /\__,=_[_] ' . . ' [_]_=,__/\ |
# |_\_ |----| |----| _/_|
# | |/ | | | | \| |
# | /_ | | | | _\ |
echo "Enter the name of your flat file: "
read input_variable
echo "You entered: $input_variable"
#create urls variable array
declare urls=( `cat "$input_variable" `)
#Download files from URL list
for m in "${urls[@]}"
do curl -O "$m"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment