summaryrefslogtreecommitdiff
path: root/bin/cdxget
diff options
context:
space:
mode:
Diffstat (limited to 'bin/cdxget')
-rwxr-xr-xbin/cdxget7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/cdxget b/bin/cdxget
new file mode 100755
index 0000000..a54612d
--- /dev/null
+++ b/bin/cdxget
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+url='http://web.archive.org/cdx/search/cdx?'
+for arg in "$@"; do
+ url+="$s${arg%%=*}=$(printf '%s' "${arg#*=}"|urlencode)&"
+done
+curl -s "$url"