I would like to display text in color/bold etc from the shell (echo command
for example).
Is there a standard and simply way to do this. I would like to avoid having
to change
this for every terminal type
- Mario
I would like to display text in color/bold etc from the shell (echo command
for example).
Is there a standard and simply way to do this. I would like to avoid having
to change
this for every terminal type
Thereās tput, but itās not 100% for all terminals. For example, on some
terminals, āboldā is the same as normal; on others, ādimā is the same as
normal. Try āman tputā or look in the back of the ncurses manual.
On Qnx4, termtype - qnx or qansi, this works:
echo "hello \c;tput bold;echo mario;tput sgr0
As the man page illustrates, you (or your script) can get sexier by
doing something like bd=tput bold
;nm=`tput sgr0
Mario Charest wrote:
I would like to display text in color/bold etc from the shell (echo command
for example).
Is there a standard and simply way to do this. I would like to avoid having
to change
this for every terminal type >
- Mario
Something happened - here is the completed version.
Richard Kramer wrote:
Thereās tput, but itās not 100% for all terminals. For example, on some
terminals, āboldā is the same as normal; on others, ādimā is the same as
normal. Try āman tputā or look in the back of the ncurses manual.On Qnx4, termtype - qnx or qansi, this works:
echo "hello \c;tput bold;echo mario;tput sgr0As the man page illustrates, you (or your script) can get sexier by
doing something like bd=tput bold
;nm=`tput sgr0
doing something like:
bd=tput bold
;nm=tput sgr0
;echo hello ${bd}mario${nm}
Richard
Mario Charest wrote:
I would like to display text in color/bold etc from the shell (echo command
for example).
Is there a standard and simply way to do this. I would like to avoid having
to change
this for every terminal type >
- Mario
āRichard Kramerā <rrkramer@kramer-smilko.com> wrote in message
news:3CB5DDFC.D83A94CF@kramer-smilko.comā¦
Something happened - here is the completed version.
Richard Kramer wrote:
Thereās tput, but itās not 100% for all terminals. For example, on some
terminals, āboldā is the same as normal; on others, ādimā is the same as
normal. Try āman tputā or look in the back of the ncurses manual.On Qnx4, termtype - qnx or qansi, this works:
echo "hello \c;tput bold;echo mario;tput sgr0As the man page illustrates, you (or your script) can get sexier by
doing something like bd=tput bold
;nm=tput sgr0 doing something like: bd=
tput bold;nm=
tput sgr0`;echo hello ${bd}mario${nm}
Cool, couldnāt find tput on QNX6 but I grabbed it from the web (termutils)
and it compile out of the box, thanks.
Richard
Mario Charest wrote:I would like to display text in color/bold etc from the shell (echo
command
for example).
Is there a standard and simply way to do this. I would like to avoid
having
to change
this for every terminal type >
- Mario