dl_tool=$(command -v curl || command -v wget) if [[ ${dl_tool} == *curl* ]]; then dl_cmd="${dl_tool} -sLO $1" elif [[ ${dl_tool} == *wget* ]]; then dl_cmd="${dl_tool} -q $1" else printf "%s\n" "ERROR: curl and wget not available, exiting" fi