1 2 3 4 5 6 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"