On Fri, May 10, 2019 at 11:45:46AM -0300, Jeronimo Pellegrini wrote: > Or I can try to make the shell code that is sent to the remote > end do the verification itself (I'd test using dash, which I > hope will work on most systems of interest). Something like > > { hexdump < /dev/null && HD=hexdump; } || \ > { busybox hexdump < /dev/null && HD="busybox hexdump"; } && \ > $HD ... I actually implemented the shell scripting solution. Only tramp-hexdump-awk-encode is in the email body, but the full patch is attached. This seems to work, and requires no extra coding in tramp (only the constant strings are changed). I can also do the templating in elisp, if you think it would be better. J. (defconst tramp-hexdump-awk-encode "{ { awk '{}' 75) { printf \"\\n\"; rc=0 } obc=0; o=0 } } } } } END { if (obc) { tail=(obc==2) ? \"==\\n\" : \"=\\n\" while (obc++<6) { o=o*2 } printf \"%%c\", substr(b64,o+1,1) } else { tail=\"\\n\" } printf tail }'" "Awk/hexdump program to use for encoding a file. This string is passed to `format', so percent characters need to be doubled.")