dotfiles/.local/bin/urlencode

5 lines
156 B
Plaintext
Raw Permalink Normal View History

2023-12-03 08:19:59 +00:00
#!/bin/bash
input="$([ $# -gt 0 ] && printf "%s\n" "$*" || cat -)"
python -c "import urllib.parse, sys; print(urllib.parse.unquote(sys.argv[1]))" "$input"