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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bash scripting question for Debian 3.1 2

Status
Not open for further replies.

MichealC4

Programmer
Jun 26, 2003
457
0
0
I'm trying to get the following to work: echo -e '\e[32m\e[05mSuccess\033[0m'

It outputs okay, but the 05m attribute doesn't act as expected, it instead surrounds the text in a gray background.

I hoped in to a couple of IRC channels one person got it working just fine in Gentoo, so I'm wondering if it is something off by default in Debian or something lacking, or whatnot.

----------------------------
"Will work for bandwidth" - Thinkgeek T-shirt
 
On my Debian 3.1 xterm, in Fluxbox, it produces a flashing green Success message.
 
looks like it depends what TERM usr are using, when I invoked a xterm it worked (flashing green Sucess) the default FC4 justa grenn Success no flash
 
A more portable solution is to use tput attribute commands which will echo the correct escape sequences for the current terminal setting, or none at all if it believes the terminal does not have the capability to display colour. See man terminfo for the list of attributes ("setaf", "setf", "sgr0", etc.).

Annihilannic.
 
Thanks!

----------------------------
"Will work for bandwidth" - Thinkgeek T-shirt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top