Variable: tramp-hexdump-awk-encode

tramp-hexdump-awk-encode is a variable defined in tramp-sh.el.gz.

Value

"%h -v -e '16/1 \" %%02x\" \"\\n\"' | %a '\\\nBEGIN {\n  b64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"\n  b16 = \"0123456789abcdef\"\n}\n{\n  for (c=1; c<=length($0); c++) {\n    d=index(b16, substr($0,c,1))\n    if (d--) {\n      for (b=1; b<=4; b++) {\n        o=o*2+int(d/8); d=(d*2)%%16\n        if (++obc==6) {\n          printf substr(b64,o+1,1)\n          if (++rc>75) { printf \"\\n\"; rc=0 }\n          obc=0; o=0\n        }\n      }\n    }\n  }\n}\nEND {\n  if (obc) {\n    tail=(obc==2) ? \"==\\n\" : \"=\\n\"\n    while (obc++<6) { o=o*2 }\n    printf \"%%c\", substr(b64,o+1,1)\n  } else {\n    tail=\"\\n\"\n  }\n  printf tail\n}'"

Documentation

hexdump / awk pipe to use for encoding a file.

Format specifiers are replaced by tramp-expand-script, percent characters need to be doubled.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp-sh.el.gz
(defconst tramp-hexdump-awk-encode
  (format "%s | %s" tramp-hexdump-encode tramp-awk-encode)
  "`hexdump' / `awk' pipe to use for encoding a file.
Format specifiers are replaced by `tramp-expand-script', percent
characters need to be doubled.")