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"