On Feb 18 2019, Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote:

> diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
> --- a/libgo/testsuite/gotest
> +++ b/libgo/testsuite/gotest
> @@ -627,13 +627,13 @@ symtogo() {
>                                    -e 's/[    ]*$/\\n/g' |
>                                tr -d '\n')"
>                   # Remove leading and trailing \n.
> -                 output="$(echo "$output" | sed -e 's/^\(\\n\)*//' -e 
> 's/\(\\n\)*$//')"
> +                 output="$(printf %s "$output" | sed -e 's/^\(\\n\)*//' -e 
> 's/\(\\n\)*$//')"

printf %s does not print a trailing newline, and some implementations of
sed cannot cope with incomplete lines.

Andreas.

-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

Reply via email to