DOWNLOAD_PATH="sample.ext"
RATE_LIMIT="300K"
mkdir ../$DOWNLOAD_PATH
BASE_COMMAND="screen wget --continue --directory-prefix=../$DOWNLOAD_PATH --tries=2 --input-file=$DOWNLOAD_PATH"
$("${BASE_COMMAND} --limit-rate=${RATE_LIMIT}")
This does not work, but throws an error:
line 5: screen wget --continue --directory-prefix=../sample.ext --tries=2 --input-file=sample.ext --limit-rate=300K: No such file or directory
However, if i do
DOWNLOAD_PATH="sample.ext"
RATE_LIMIT="300K"
mkdir ../$DOWNLOAD_PATH
BASE_COMMAND="screen wget --continue --directory-prefix=../$DOWNLOAD_PATH --tries=2 --input-file=$DOWNLOAD_PATH"
COMPLETE_COMMAND="${BASE_COMMAND} --limit-rate=${RATE_LIMIT}"
$($COMPLETE_COMMAND)
everything works just fine... Why?