On Tuesday 13 November 2012 13:17:40 Harald van Dijk wrote:
> Secondly, echo -e is nonportable (see `man 1p echo` on most Linux
> systems), and doesn't behave on dash as it does on bash, causing a test
> failure in crlf-handling.
>
> --- patch-2.7.1/tests/crlf-handling
> +++ patch-2.7.1/tests/crlf-handling
> @@ -14,7 +14,7 @@
> use_tmpdir
>
> lf2crlf() {
> - while read l; do echo -e "$l\r"; done
> + while read l; do printf "%s\r\n" "$l"; done
> }
>
> echo 1 > a
>
> printf is valid POSIX sh, which is what I've replaced it with, but I
> don't know how portable it is to not-quite-POSIX shells that you may
> wish to support.i don't think those statements are equivalent. you probably want to use %b instead of %s. printf should be portable to any semi-relevant system (and more). -mike
signature.asc
Description: This is a digitally signed message part.
