Re: [PATCH] selftests/ftrace: Make the coloring POSIX compliant

From: Adam Borowski
Date: Wed Feb 20 2019 - 15:33:15 EST


On Wed, Feb 20, 2019 at 09:20:20PM +0100, Juerg Haefliger wrote:
> On Wed, 20 Feb 2019 14:49:34 -0500
> Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> > On Wed, 20 Feb 2019 17:13:33 +0100
> > Juerg Haefliger <juerg.haefliger@xxxxxxxxxxxxx> wrote:
> >
> > > echo -e and \e are not POSIX. Depending on what /bin/sh is, we can get
> > > incorrect output like:
> >
> > I'm curious to which shell this is.
>
> Quite frankly I don't know but that's the output we get when we run it in
> Jenkins. I'll try to find out.

The only shell that did not support \e was dash -- I fixed it myself on
2017-01-24; thus I expect any Ubuntus prior to Zesty to require \033. This
means your Jenkins likely runs Xenial.

\e has been supported since ages in at least: bash zsh mksh sash posh ksh
busybox:sh; also in perl python ruby lua php, gcc clang tcc -- MSVC being
the only other exception I know about.

Indeed POSIX doesn't specify \e, but as it pretends there are charsets other
than ASCII and EBCDIC, it can't. There's no escape in its "portable
character set".


Meow!
--
âââââââ
âââââââ
âââââââ Have you accepted Khorne as your lord and saviour?
âââââââ