From 19513a654e6cec0b8813c90a3f8216bb5e441baa Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 16 Aug 2023 19:31:05 +0200 Subject: [PATCH] ; Fix last change * lisp/net/tramp-sh.el (tramp-bundle-read-file-names): Replace "echo -n" by "printf", it isn't portable. (Bug#65321) --- lisp/net/tramp-sh.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 4e6ba6e38d7..0599f89655c 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1077,10 +1077,10 @@ characters need to be doubled.") "echo \"(\" while read file; do quoted=`echo \"$file\" | sed -e \"s/\\\"/\\\\\\\\\\\\\\\\\\\"/\"` - echo -n \"(\\\"$quoted\\\"\" - if %s \"$file\"; then echo -n \" t\"; else echo -n \" nil\"; fi - if %s \"$file\"; then echo -n \" t\"; else echo -n \" nil\"; fi - if %s \"$file\"; then echo \" t)\"; else echo \" nil)\"; fi + printf \"(%%b\" \"\\\"$quoted\\\"\" + if %s \"$file\"; then printf \" %%b\" t; else printf \" %%b\" nil; fi + if %s \"$file\"; then printf \" %%b\" t; else printf \" %%b\" nil; fi + if %s \"$file\"; then printf \" %%b)\n\" t; else printf \" %%b)\n\" nil; fi done echo \")\"" "Script to check file attributes of a bundle of files. @@ -1088,7 +1088,8 @@ It must be sent formatted with three strings; the tests for file existence, file readability, and file directory. Input shall be read via here-document, otherwise the command could exceed maximum length of command line. -Format specifiers \"%s\" are replaced before the script is used.") +Format specifiers \"%s\" are replaced before the script is used, +percent characters need to be doubled.") ;; New handlers should be added here. ;;;###tramp-autoload -- 2.39.5