#!/usr/bin/env bash # Copyright (c) 2017, 2023 Luke Shumaker # # This work is free. You can redistribute it and/or modify it under # the terms of the Do What The Fuck You Want To Public License, # Version 2, as published by Sam Hocevar. See the COPYING file for # more details. url='http://web.archive.org/cdx/search/cdx' s='?' for arg in "$@"; do url+="$s${arg%%=*}=$(printf '%s' "${arg#*=}"|urlencode)" s='&' done curl -sfL "$url"