From f6ed4c575738baef19caec10ddf61fec6389af90 Mon Sep 17 00:00:00 2001 From: tosu Date: Mon, 6 Mar 2023 00:10:44 +0100 Subject: [PATCH] Padding for pipes and line continuation backslashes --- downloadPOSIX.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/downloadPOSIX.sh b/downloadPOSIX.sh index d7917f6..06adb24 100755 --- a/downloadPOSIX.sh +++ b/downloadPOSIX.sh @@ -89,12 +89,12 @@ mkdir -p -- "${OUTDIR}" || { # https://www.ietf.org/rfc/rfc2396.txt # 2.4.3. Excluded US-ASCII Characters m3u8_manifest_urls_and_metadata="$( - wget --no-verbose \ + wget --no-verbose \ --quiet \ --output-document - \ --header="authorization: Bearer ${BASE64_BEARER_TOKEN}" \ -- "${API_URL}" | - jq --raw-output \ + jq --raw-output \ '.value[] | .name + ">" + .media.duration[2:] + ">" + (.playbackUrls | map(select(.mimeType == "application/vnd.apple.mpegurl")) | .[].playbackUrl)' )" @@ -127,8 +127,8 @@ do -progress - \ -c copy \ "${filepath}" | - grep --line-buffered 'out_time=' | - sed -u -e 's/out_time=//g' -e 's/\..*//g' -e 's/^-//g' | + grep --line-buffered 'out_time=' | + sed -u -e 's/out_time=//g' -e 's/\..*//g' -e 's/^-//g' | xargs -I{} printf '%s\r' "{} of ${length} " printf '\n\033[33m%s\033[m\n' "Done"