summaryrefslogtreecommitdiff
path: root/bin/cdxget
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-06-30 20:05:23 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-06-30 20:05:23 -0400
commite46a74fe8a143936eee2b9be1fd6b5f963357d9d (patch)
tree457e959fc8bcdf1222092a29435e468c824bb697 /bin/cdxget
parent57266bea1b5fd82c6cc199c538783306c668b661 (diff)
work on it
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"