Browse thread
color on linux terminal
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Goulagman <goulagman@g...> |
| Subject: | Re: [Caml-list] color on linux terminal |
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 > >