New comment by leahneukirchen on mblaze repository https://github.com/leahneukirchen/mblaze/issues/189#issuecomment-709328953 Comment: Another try: ``` IFS=' ' mcom $( awk -v url="$1" ' function decode(s) { hexdigits = "0123456789abcdef" for (i = 1; i < length(s); i++) { if (substr(s, i, 3) ~ /%[0-9a-fA-F][0-9a-fA-F]/) { c = sprintf("%c", (index(hexdigits, tolower(substr(s, i+1, 1)))-1) * 16 + \ index(hexdigits, tolower(substr(s, i+2, 1)))-1) s = substr(s, 1, i-1) c substr(s, i+3) i += 2 } } return s } BEGIN { url = decode(url) sub(/^mailto:/, "", url) split(url, parts, "?") to = parts[1] split(parts[2], fields, "&") args[1] = to for (i in fields) { split(fields[i], kv, "=") if (kv[1] != "r") { args[length(args)+1] = "-" kv[1] args[length(args)+1] = kv[2] } } for (i in args) { print decode(args[i]) } } ' ) ```