On Thursday 25 November 2010 00:24, Ralf Friedl wrote:
>
> > + # need to use printf: different shells have inconsistent
> > + # rules re handling of "\n" in their params,
> >
> Which shells have inconsistent handling? All shells that I have access
> to at the moment (ash, bash, sash, tcsh, zsh and busybox ash) print
> their params as is:
> printf %s "\n" -> \n
> Also, all of these shells convert \n in the format string to newline.
Does this look better?
# Need to use printf: different shells have inconsistent
# rules re handling of "\n" in echo params,
# and ${insert} definitely contains "\n".
# Therefore, echo "${header}" would not work:
printf "%s\n" "${header}"
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox