summaryrefslogtreecommitdiff
path: root/bin/cdxget
blob: 1d465b29c139917b2c5714ce5d9995fe5c2b1839 (plain)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env bash

url='http://web.archive.org/cdx/search/cdx'
s='?'
for arg in "$@"; do
	url+="$s${arg%%=*}=$(printf '%s' "${arg#*=}"|urlencode)"
	s='&'
done
curl -sL "$url"