summaryrefslogtreecommitdiff
path: root/bin/cdxget
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2023-10-14 19:05:21 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2023-10-14 19:05:21 -0600
commitc6ba01f3f27872a7e9479ec4cd3da018f231b556 (patch)
tree57c307936bb30734cc29e64e3495ec441ea94380 /bin/cdxget
parenta76e7458aa34ebe08cbf7048df5d6b183f5bbaef (diff)
parente35a01b00eb39366b6c8b1294c6a766838313f38 (diff)
Merge branch 'lukeshu/tidy'
Diffstat (limited to 'bin/cdxget')
-rwxr-xr-xbin/cdxget8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/cdxget b/bin/cdxget
index 46d56c4..6844fa6 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"
+curl -sfL "$url"