You are not logged in.
Pages: 1
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
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
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
Pages: 1