Closed Licht-T closed 3 years ago
Hello Licht,
Good catch, thanks !
What about using : printf "%s\n" "-E" instead ?
The Opengroup says : "It is not possible to use echo portably across all POSIX systems unless both -n (as the first argument) and escape sequences are omitted." (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html)
Could you update the PR ?
@martymac Hello Ganael, thank you for the review!
Just before, I also found that echo -e
option did not work on some shell, and Autoconf used printf
instead.
https://translate.google.com/translate?sl=ja&tl=en&u=https://mattintosh.hatenablog.com/entry/2013/12/11/201503
I have just updated my PR so that we use printf
!
NOTE: It may be better that we replace other echo
's by the Autoconf style in another PR.
as_echo='printf %s\n'
as_echo_n='printf %s'
$as_echo "foobar"
$as_echo_n "foobar"
@Licht-T,
Yes, I'll take a look at other calls to echo in a near future. Thanks for your patch !
When "Directory mode",
fpsync
will pass-E
tofpart
but actually does not. This is caused by the behavior ofecho
:-E
is treated as an option forecho
itself. This PR fixes the issue.