You can usually avoid internal quotes with \:
RANGE="-H \"Range: bytes=20-30\""
But this will not work when you run the command - unless you put evalbefore everything:
RANGE="-H \"Range: bytes=20-30\""
eval $CLIENT $REQ_HDRS $RSP_HDRS $RANGE
However, since you are using bash, not sh, you can put individual arguments into arrays:
RANGE=(-H "Range: bytes=20-30")
$CLIENT $REQ_HDRS $RSP_HDRS "${RANGE[@]}"
This can be continued:
ARGS=(
-U
-e
-H "Range: bytes=20-30"
)
$CLIENT "${ARGS[@]}"
source
share