You are not logged in.

#1 2006-12-27 17:07:07

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

Boot-message color question

OK, this might seem extremely silly, but I'm going to ask anyway,
When I boot up Arch, after all the hardware detection stuff is over and the kernel starts loading, the messages are all in a vary bright shade of white, not the usual dull white that you get in a console. Can someone tell me how to use this "bright white" in normal shell scripts?
And is there a quick guide to applying colors to Bash Script outputs?
Thanks,
Basu


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

#2 2006-12-27 18:13:43

martti1
Member
Registered: 2006-10-14
Posts: 38

Re: Boot-message color question

http://www.cactus.org/~dak/shellscript.html - search for "making scripts colorful".

It seems that you can only make the text bright by making it bold (??). So 1 means bold and 37 is the white color. 0m in the end switches the color back to normal white.Here's how you would write something "bright white":

echo -e "e[1;37m Some Text Heree[0m"

-e after echo enables interpretation of backslash escapes, which in this case is e.

More examples:
e[1;37;42m - bold white on a green background.
e[0;44m - blue background color, doesn't change foreground.
e[0;33m - yellow foreground color, doesn't change background.
e[1;33m - bright yellow.

That's it I guess, I hope it helps a little bit.


Linux user #438799

Offline

#3 2006-12-28 04:09:07

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

Re: Boot-message color question

Thanks. will give it a try


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

Board footer

Powered by FluxBB