Rainer Orth <r...@cebitec.uni-bielefeld.de> writes:

> diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
> --- a/libgo/testsuite/gotest
> +++ b/libgo/testsuite/gotest
> @@ -231,7 +231,7 @@ mkdir _test
>  
>  case "x$gofiles" in
>  x)
> -     gofiles=$(echo -n $(ls *_test.go 2>/dev/null))
> +     gofiles=$(printf "%s" "$(ls *_test.go 2>/dev/null)")

There is no reason to use "echo -n" in the first place, since command
substitution strips trailing newlines.  But the printf replacement keeps
internal newlines, unlike the original line.  If that is ok then this is
a useless use of printf, since you can just assign the output of the
nested command directly.

Andreas.

-- 
Andreas Schwab, sch...@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."

Reply via email to