|
Subject:
|
Font Color
|
|
Posted By:
|
OzzyUltra
|
Post Date:
|
9/23/2003 11:22:25 AM
|
HI,
People i have a little problem with programming on Linux . Right now I am using Kate on Linux for performing my programming needs. I need a to change the color of the font which appears on the standard output. I can't seem to find the header library associated with this particualr function. Please help me out.
its really appreciated Ozzy
|
|
Reply By:
|
ciderpunx
|
Reply Date:
|
10/22/2004 10:01:51 AM
|
you can use \033[ <colour_number> m without the spaces eg: echo -e "\033[42mThis is green\033[0m"
I knocked up a bit of perl to illustrate:
#!/usr/bin/perl
for (30..37,40..47) { print "\n" if ($_%10==0); print "\033[$_" . "m $_ \033[0m"; } print "\n";
-- Don't Stand on your head - you'll get footprints in your hair. http://charlieharvey.com
|