On Wed, Jun 2, 2010 at 06:32, Johannes Sixt [off-list ref] wrote:
[When you resend the series in such a manner that you collect a Cc list
manually, please do *not* include me. I'm not interested in this series.]
Am 6/2/2010 1:39, schrieb Ævar Arnfjörð Bjarmason:
quoted
+ # Not everyone has echo -n
+ case $(echo -n) in
+ \-n) Xn= ; Xc='\c' ;;
+ *) Xn=-n ; Xc=
+ esac
Don't use 'echo'; use 'printf %s'.
I didn't write this code (as the comment says) but I /thought/ that
the whole point of it was to autodetect if echo -n worked, and if so
use it because it'd be faster than printf "%s", otherwise use some
evil foo\n\c hack.
That hack doesn't work on bash ('\c' produces a space), maybe it
doesn't work anywhere. Do you have a shell that doesn't support echo
-n? What does it output there?
I wouldn't be surprised if it did need to be changed to printf
"%s". I'm just curious where it broke and how.