summaryrefslogtreecommitdiff
path: root/bin/cdxget
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2023-10-14 16:02:04 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2023-10-14 18:47:41 -0600
commit0f34be118ae3b89a707eca452ede80cb05bbc589 (patch)
tree9e90bb51dea18f91a402df1da8e8aa1c724cc921 /bin/cdxget
parenta76e7458aa34ebe08cbf7048df5d6b183f5bbaef (diff)
cdxget: Tidy URL separators
Diffstat (limited to 'bin/cdxget')
-rwxr-xr-xbin/cdxget6
1 files 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"