Context: I have a script in that long lines are being striped.
In bash, I could do this
CURL=/usr/bin/curl
declare -a ARGS=(
--silent
--location
--output /dev/null
--write-out "%{http_code}"
--request GET
--max-time 30
--retry 3
"https://httpbin.org/status/200"
)
http_code=$("$CURL" "${ARGS[@]}")
However, ash does not have arrays. Is there another alternative to avoid long lines like I can do on bash in ash or in sh?
Long lines can be split with backslashes: