On 13/01/07, Markus Weihs <mweihs@gmx.at> wrote:
Hi,

to get coloured output on a linux terminal, you can do something like

    echo -e "\033[31m This is now red"

How can I do this with OCaml? The following doesn't work

    print_string "\033[31m blabla"

It's because, for Ocaml,   the escape sequence \0xx matches the ASCII character xx in decimal, not in octal.

print_string "\027[31m blabla" works fine

Thanks in advance,

Markus