Any idea how to type Esc sequence that change color of my output to pterm
in QNX 6.1
(in QNX 4.xx when I type for TERM=qnxm
echo ‘\033\100\062\060Instalation successful’
I get green foreground and black background
or for TERM=qansi-m
echo ‘\233\075\062\106Instalation successful’
and I get the same result
But in QNX6.1 it doesn’t work. I read devc-con helpfile…
Any idea how to type Esc sequence that change color of my output to pterm
in QNX 6.1
(in QNX 4.xx when I type for TERM=qnxm
echo ‘\033\100\062\060Instalation successful’
I get green foreground and black background
or for TERM=qansi-m
echo ‘\233\075\062\106Instalation successful’
and I get the same result
But in QNX6.1 it doesn’t work. I read devc-con helpfile…
In 7 bit mode, CSI (Contrl Sequence Introducer) is ESC [ (\e[ or \033[),
while in 8 bit it is 0x9b (or \233).
It’s then followed by a list of numbers seperated by a semicolon, and
ending with a ‘m’.
So to set the foreground colour to a bold green, you would output -
‘\e[32;1m’
The 30+2 is the foreground colour (2 is green), and 1 sets bold.
For a bold blue with a black background -
‘\e[34;1;40m’
You can find the other commands you can use in the devc-con docs, under
Graphic rendition. You might need to experiment how you are printing
out the CSI sequence, depending on the shell and what command you’re
using to print.
Any idea how to type Esc sequence that change color of my output to
pterm
in QNX 6.1
(in QNX 4.xx when I type for TERM=qnxm
echo ‘\033\100\062\060Instalation successful’
I get green foreground and black background
or for TERM=qansi-m
echo ‘\233\075\062\106Instalation successful’
and I get the same result
But in QNX6.1 it doesn’t work. I read devc-con helpfile…
In 7 bit mode, CSI (Contrl Sequence Introducer) is ESC [ (\e[ or \033[),
while in 8 bit it is 0x9b (or \233).
It’s then followed by a list of numbers seperated by a semicolon, and
ending with a ‘m’.
So to set the foreground colour to a bold green, you would output -
‘\e[32;1m’
The 30+2 is the foreground colour (2 is green), and 1 sets bold.
For a bold blue with a black background -
‘\e[34;1;40m’
You can find the other commands you can use in the devc-con docs, under
Graphic rendition. You might need to experiment how you are printing
out the CSI sequence, depending on the shell and what command you’re
using to print.