$ ./download_files.sh http://url_to_files/downloads/
$ touch download_files.sh
#!/bin/bash
set -e
url=
# Get the first parameters
echo Starting in URL: "$1"
url="$1"
# Loop in files
for file in $(curl -s $url |
grep href |
sed 's/.*href="//' |
sed 's/".*//' |
grep '^[a-zA-Z].*'); do
curl -s -O $url/$file
done