diff --git a/contrib/download-frozen-image-v2.sh b/contrib/download-frozen-image-v2.sh index 22a4b78273..54b592307f 100755 --- a/contrib/download-frozen-image-v2.sh +++ b/contrib/download-frozen-image-v2.sh @@ -63,7 +63,7 @@ fetch_blob() { -D- )" curlHeaders="$(echo "$curlHeaders" | tr -d '\r')" - if echo "$curlHeaders" | grep -qE "^HTTP/[0-9].[0-9] 3"; then + if grep -qE "^HTTP/[0-9].[0-9] 3" <<<"$curlHeaders"; then rm -f "$targetFile" local blobRedirect="$(echo "$curlHeaders" | awk -F ': ' 'tolower($1) == "location" { print $2; exit }')"