Re: dash and ANSI escape sequences

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/18/2014 02:11 PM, Guido Berhoerster wrote:
[snip]
Am I somehow missing some hidden functionality in printf, or is
there really no POSIX compliant method of printing colors, or is
Dash simply incomplete with its POSIX support in this regard?

dash, POSIX, or C89 have nothing to do with colors, it depends on
your terminal whether it interprets certain escape sequences as
color attributes.

Ahh. Ok.

You can print arbitrary bytes in a portable way (i.e. as
specified by POSIX) by using octal notation, e.g. escape is 033
in octal:

printf "\033[1;32mpassed\033[0m\n"

Understood; I get how this all fits together now.

Thanks for your example and explanation!

---Alex


--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux