Thorsten Glaser <[email protected]> wrote:
 |Steffen Daode Nurpmeso dixit:
 |
 |>  echo; echo mksh, echo:
 |>  mksh -c 'echo -e "\ttab\tul\cau\tau"'
 |
 |Which of the three echo implementations in mksh? ;-)
 |
 |>POSIX says:
 |
 |POSIX says that echo isn’t portable as soon as you have
 |something with backslashes in it or begin with a hyphen-minus
 |(“implementation-defined”).
 |
 |Everything else is extensions.
 |
 |mksh by default implements a BSD-ish (full-featured) echo,
 |except in POSIX mode, which implements a POSIX echo with
 |the -n option, as required by Debian Policy. mksh does not
 |target the XSI extension.
 |
 |And then there’s the special variants for MidnightBSD and,
 |IIRC, something else I don’t recall (maybe don’t want to).
 |
 |In short: use mksh for all your scripts, then use the print
 |builtin, which is portable. Period.

I'm fine with using printf(1), which is the one that works the
expected -- but for this one mksh.1 (but this is R45) says that

  This is not normally part of mksh; however, distributors may
  have added this as builtin as a speed hack.  Do not use in new
  code.

Bummer! :)

--steffen

Reply via email to