01-21-2013
Then just use cat testlogfile.txt, and should output green text (blue or whatever you set it to), if you edit it with editor you will see your text enclosed in special escape chars as per example above.
Hope that clears things out.
Regards
Peasant.
10 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
Any chance you might change the icon's that indicate New/No New Posts in the forum. For those who suffer colour blindness of varrying degrees it has become a bit of a problem (myself included) with the new colour scheme.
Cheers,
Cameron (4 Replies)
Discussion started by: Cameron
4 Replies
2. Shell Programming and Scripting
There has been a previous question about displaying text in different colours using a script in Bourne - this doesn't seem to work the same for Korn...
Is it possible to display text in different colours when using the Korn shell or am I doing it wrong? (3 Replies)
Discussion started by: dbrundrett
3 Replies
3. Shell Programming and Scripting
Can i add colours to bourne Script ? (22 Replies)
Discussion started by: XXXXXXXXXX
22 Replies
4. UNIX for Advanced & Expert Users
Hi,
I need to set the background colors for cygwin console, when I do ssh to production boxes.
This should be done through commands..
Please suggest me asap.
Thanks in advance. (3 Replies)
Discussion started by: praveen_b744
3 Replies
5. Solaris
Can any one tell me how to change the screen colors of the screen when connected unix using putty. I tryed setting from colors but it's not happening (2 Replies)
Discussion started by: svenkatareddy
2 Replies
6. Shell Programming and Scripting
I have information in a file called HITS. This file has been populated by the user entering search criteria.
the HITS file contains information:
filname.hits: 123.33.345.66 Fri Nov 26 11.45.56.43 GMT 2006
at the moment i am just displayin the information using cat HITS.
... (3 Replies)
Discussion started by: amatuer_lee_3
3 Replies
7. UNIX for Dummies Questions & Answers
Hi!
I am a newbie to Unix. I was writing a little game program for fun when thought of an idea to allow data to be saved. I knew to take all of the Predefined variables and put them into a separate file, then including the file in the program. But I am having trouble making it so that the user... (0 Replies)
Discussion started by: signebedi
0 Replies
8. Shell Programming and Scripting
Hi all,
In my script output, I want to print a line with blue colour, if the condition is satisfied, otherwise it should print with red colour. Can anyone please help me on the same requirment.
Thank You.
Regards,
Raghu. (1 Reply)
Discussion started by: raghu.iv85
1 Replies
9. Shell Programming and Scripting
Hi,
I have set the following piece of code in .vimrc file.
================================================
if has("terminfo")
let &t_Co=16
let &t_AB="\<Esc>
=================================================
unable to understand the significance of certain things. This sets the colour... (4 Replies)
Discussion started by: rac
4 Replies
10. UNIX for Dummies Questions & Answers
Hi all - just started using Linux Mint 17 and I need to change the Foreground & Background Colours for the Terminal, my eyesight is not what it used to be many years ago, so any help would be much appreciated.
Regards
Malcolm (6 Replies)
Discussion started by: electrocad
6 Replies
LEARN ABOUT SUSE
gd::graph::colour
Graph::colour(3) User Contributed Perl Documentation Graph::colour(3)
NAME
GD::Graph::colour - Colour manipulation routines for use with GD::Graph
SYNOPSIS
use GD::Graph::colour qw(:colours :lists :files :convert);
DESCRIPTION
The GD::Graph::colour package provides a few routines to work with colours. The functionality of this package is mainly defined by what is
needed, now and historically, by the GD::Graph modules.
FUNCTIONS
colour_list( number of colours )
Returns a list of number of colours colour names known to the package. Exported with the :lists tag.
sorted_colour_list( number of colours )
Returns a list of number of colours colour names known to the package, sorted by luminance or hue. NB. Right now it always sorts by
luminance. Will add an option in a later stage to decide sorting method at run time. Exported with the :lists tag.
_rgb( colour name )
Returns a list of the RGB values of colour name. if the colour name is a string of the form that is acceptable to the hex2rgb sub, then the
colour will be added to the list dynamically. Exported with the :colours tag.
_hue( R,G,B )
Returns the hue of the colour with the specified RGB values. Exported with the :colours tag.
_luminance( R,G,B )
Returns the luminance of the colour with the specified RGB values. Exported with the :colours tag.
add_colour(colourname => [$r, $g, $b]) or add_colour('#7fe310')
Self-explanatory. Exported with the :colours tag.
rgb2hex($red, $green, $blue)
hex2rgb('#7fe310')
These functions translate a list of RGB values into a hexadecimal string, as is commonly used in HTML and the Image::Magick API, and vice
versa. Exported with the :convert tag.
read_rgb( file name )
Reads in colours from a rgb file as used by the X11 system.
Doing something like:
use GD::Graph::bars;
use GD::Graph::colour;
GD::Graph::colour::read_rgb("rgb.txt") or die "cannot read colours";
Will allow you to use any colours defined in rgb.txt in your graph. Exported with the :files tag.
PREDEFINED COLOUR NAMES
white, lgray, gray, dgray, black, lblue, blue, dblue, gold, lyellow, yellow, dyellow, lgreen, green, dgreen, lred, red, dred, lpurple,
purple, dpurple, lorange, orange, pink, dpink, marine, cyan, lbrown, dbrown.
AUTHOR
Martien Verbruggen <mgjv@tradingpost.com.au>
Copyright
GIFgraph: Copyright (c) 1995-1999 Martien Verbruggen. Chart::PNGgraph: Copyright (c) 1999 Steve Bonds. GD::Graph: Copyright (c) 1999
Martien Verbruggen.
All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
GD::Graph, GD::Graph::FAQ
perl v5.12.1 2005-12-14 Graph::colour(3)