Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

make text bold and color 2

Status
Not open for further replies.

hokky

Technical User
Nov 9, 2006
170
AU
Hi guys,

I know to make text bold or color using escape
\033[1m --> bold
\033[5m --> color

can I make it both ?

Thanks heaps
 
Hi,

For portability reasons, it's better to use tput attributs. This way your script will work an any kind of terminal. Escape sequences usually work on one terminal ( or one family) .
man tput for more ot goole tput terminfo.
tput clear ( clear screen )
tput smso ( set reverse video mode )
tput rmso ( reset reverse video )
tput smul ( set mode underline )
tput rmul ( reset mode underline)
tput cup x y ( cursor position )
and more

 
Thanks guys,

I'll learn more about tput
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top