ESGF / esgf-wget

Service API endpoint for simplified wget scripts
0 stars 4 forks source link

Add the parameter 'simple' for creating simplified wget scripts #17

Closed mauzey1 closed 4 years ago

mauzey1 commented 4 years ago

Resolves #15 By setting the parameter simple=true, you can create wget scripts that are only a list of file URLs and a loop for downloading them.

Example:

#!/bin/bash

download_files=(
'http://aims3.llnl.gov/thredds/fileServer/user_pub_work/CMIP6/CMIP/E3SM-Project/E3SM-1-1/piControl/r1i1p1f1/Amon/huss/gr/v20191029/huss_Amon_E3SM-1-1_piControl_r1i1p1f1_gr_185001-187412.nc'
'http://aims3.llnl.gov/thredds/fileServer/user_pub_work/CMIP6/CMIP/E3SM-Project/E3SM-1-1/piControl/r1i1p1f1/Amon/huss/gr/v20191029/huss_Amon_E3SM-1-1_piControl_r1i1p1f1_gr_187501-189912.nc'
'http://aims3.llnl.gov/thredds/fileServer/user_pub_work/CMIP6/CMIP/E3SM-Project/E3SM-1-1/piControl/r1i1p1f1/Amon/huss/gr/v20191029/huss_Amon_E3SM-1-1_piControl_r1i1p1f1_gr_190001-192412.nc'
'http://aims3.llnl.gov/thredds/fileServer/user_pub_work/CMIP6/CMIP/E3SM-Project/E3SM-1-1/piControl/r1i1p1f1/Amon/huss/gr/v20191029/huss_Amon_E3SM-1-1_piControl_r1i1p1f1_gr_192501-194912.nc'
'http://aims3.llnl.gov/thredds/fileServer/user_pub_work/CMIP6/CMIP/E3SM-Project/E3SM-1-1/piControl/r1i1p1f1/Amon/huss/gr/v20191029/huss_Amon_E3SM-1-1_piControl_r1i1p1f1_gr_195001-197412.nc'
'http://aims3.llnl.gov/thredds/fileServer/user_pub_work/CMIP6/CMIP/E3SM-Project/E3SM-1-1/piControl/r1i1p1f1/Amon/huss/gr/v20191029/huss_Amon_E3SM-1-1_piControl_r1i1p1f1_gr_197501-199912.nc'
'http://aims3.llnl.gov/thredds/fileServer/user_pub_work/CMIP6/CMIP/E3SM-Project/E3SM-1-1/piControl/r1i1p1f1/Amon/huss/gr/v20191029/huss_Amon_E3SM-1-1_piControl_r1i1p1f1_gr_200001-201412.nc'
)

for i in "${download_files[@]}"
do
   wget $i
done