summaryrefslogtreecommitdiff
path: root/bin/cdxget
diff options
context:
space:
mode:
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"