Skip to content

Instantly share code, notes, and snippets.

@draganHR
Last active August 29, 2015 14:05
Show Gist options
  • Save draganHR/d51fe978dc685b549e83 to your computer and use it in GitHub Desktop.
Save draganHR/d51fe978dc685b549e83 to your computer and use it in GitHub Desktop.
Usage: curl-loop.sh <url> <count>
#!/bin/bash
URL=$1
COUNT=$2
if [ -z "${COUNT}" ]; then
COUNT=10
fi
echo "Downloading ${URL}:"
i=1
while [[ $i -le $COUNT ]]
do
echo "$i..."
curl ${URL} > /dev/null
((i = i + 1))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment