summaryrefslogtreecommitdiff
path: root/cdx_json
blob: 81284af1eb7f2d99ee1305c7b54584d8b4629eb8 (plain)
1
2
3
4
5
6
7
#!/usr/bin/env bash

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