From 0f34be118ae3b89a707eca452ede80cb05bbc589 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Sat, 14 Oct 2023 16:02:04 -0600 Subject: cdxget: Tidy URL separators --- bin/cdxget | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/cdxget b/bin/cdxget index 46d56c4..1d465b2 100755 --- a/bin/cdxget +++ b/bin/cdxget @@ -1,7 +1,9 @@ #!/usr/bin/env bash -url='http://web.archive.org/cdx/search/cdx?' +url='http://web.archive.org/cdx/search/cdx' +s='?' for arg in "$@"; do - url+="$s${arg%%=*}=$(printf '%s' "${arg#*=}"|urlencode)&" + url+="$s${arg%%=*}=$(printf '%s' "${arg#*=}"|urlencode)" + s='&' done curl -sL "$url" -- cgit v1.2.3-2-g168b