Sponsored Content
Full Discussion: color a figure in text file
Top Forums Shell Programming and Scripting color a figure in text file Post 302312870 by Bluetoot on Monday 4th of May 2009 01:07:42 AM
Old 05-04-2009
Thanx for your reply.... But it dose not work .. It seems that it copy the strings of the color to the figure ... I have change the threshold from 90 to 20 just for test..
awk '{for(i=1;i<=NF;i++)if ($i >= 20)printf("%s "," \033[31m"$i"\033[0m");else printf("%s ",$i);printf "\n"}' test_mai

Answer:

\033[31m29\033[0m \033[31m38\033[0m 19 \033[31m37\033[0m
\033[31m43\033[0m \033[31m31\033[0m \033[31m32\033[0m 12
\033[31m38\033[0m \033[31m30\033[0m 19 \033[31m35\033[0m
\033[31m26\033[0m \033[31m27\033[0m \033[31m23\033[0m \033[31m21\033[0m
\033[31m22\033[0m \033[31m21\033[0m \033[31m27\033[0m \033[31m24\033[0m
\033[31m26\033[0m \033[31m24\033[0m \033[31m20\033[0m \033[31m24\033[0m
\033[31m28\033[0m \033[31m30\033[0m \033[31m25\033[0m \033[31m21\033[0m
\033[31m25\033[0m \033[31m27\033[0m 18 \033[31m22\033[0m
\033[31m27\033[0m \033[31m30\033[0m \033[31m26\033[0m \033[31m25\033[0m
\033[31m29\033[0m \033[31m30\033[0m \033[31m20\033[0m \033[31m26\033[0m
\033[31m25\033[0m \033[31m24\033[0m \033[31m23\033[0m \033[31m21\033[0m
\033[31m32\033[0m \033[31m31\033[0m \033[31m20\033[0m \033[31m26\033[0m
\033[31m34\033[0m \033[31m29\033[0m \033[31m30\033[0m \033[31m39\033[0m
\033[31m25\033[0m \033[31m20\033[0m 15 12
\033[31m37\033[0m \033[31m30\033[0m \033[31m38\033[0m \033[31m42\033[0m
\033[31m24\033[0m \033[31m26\033[0m 18 18
\033[31m29\033[0m \033[31m23\033[0m \033[31m26\033[0m 17
\033[31m24\033[0m \033[31m28\033[0m 18 \033[31m25\033[0m
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

text color

Hi all I have a file contains columns showing figures as below : Input file A B C D 50 60 90 E 100 20 53 F 30 40 70 G 25 27 45 I want to color the value above or equal 90 by red and to be shown as below output file... (5 Replies)
Discussion started by: Bluetoot
5 Replies

2. Red Hat

New Background and Text Color

Hi. How do I change the background color and text in Fedora. I did find the set_color -b command. Thanks (1 Reply)
Discussion started by: Ccccc
1 Replies

3. Programming

changing text color in c

I'm writing my own Unix ls command in c and I was wondering if anyone knows how to or can point me to a tutorial that shows me how to change the text color of the filename depending on if it's a directory, regular file, linked file, etc..., like the real ls command does? Thanks. (4 Replies)
Discussion started by: snag49ers
4 Replies

4. Shell Programming and Scripting

change text color in postscript file

Hi everyone, I have a program that produces postscript files on the fly The color of the files produced are in black and white I want to change the text color of postscript file as the file is being produced without having to manually go into the ps file and change it myself. Any Ideas?... (5 Replies)
Discussion started by: walforum
5 Replies

5. AIX

How to color text and mail

I want to color the text and bold the text and mail these text. input: hi..(in bold) good morning (in blue color) and mail these as in color and bold :wall: (1 Reply)
Discussion started by: AhmedLakadkutta
1 Replies

6. Shell Programming and Scripting

Color text on shell programming

hello i need the main reference for color code on shell programing i know a few color like: RED='\033 (2 Replies)
Discussion started by: nimafire
2 Replies

7. Shell Programming and Scripting

Help with change significant figure to normal figure command

Hi, Below is my input file: Long list of significant figure 1.757E-4 7.51E-3 5.634E-5 . . . Desired output file: 0.0001757 0.00751 0.00005634 . . . (10 Replies)
Discussion started by: perl_beginner
10 Replies
CUBRID_GET_SERVER_INFO(3)						 1						 CUBRID_GET_SERVER_INFO(3)

cubrid_get_server_info - Return the CUBRID server version

SYNOPSIS
string cubrid_get_server_info (resource $conn_identifier) DESCRIPTION
This function returns a string that represents the CUBRID server version. PARAMETERS
o $conn_identifier -The CUBRID connection. RETURN VALUES
A string that represents the CUBRID server version; on success. FALSE on failure. EXAMPLES
Example #1 cubrid_get_server_info(3) example <?php printf("%-30s %s ", "CUBRID PHP Version:", cubrid_version()); printf(" "); $conn = cubrid_connect("localhost", 33088, "demodb"); if (!$conn) { die('Connect Error ('. cubrid_error_code() .')' . cubrid_error_msg()); } $db_params = cubrid_get_db_parameter($conn); while (list($param_name, $param_value) = each($db_params)) { printf("%-30s %s ", $param_name, $param_value); } printf(" "); $server_info = cubrid_get_server_info($conn); $client_info = cubrid_get_client_info(); printf("%-30s %s ", "Server Info:", $server_info); printf("%-30s %s ", "Client Info:", $client_info); printf(" "); $charset = cubrid_get_charset($conn); printf("%-30s %s ", "CUBRID Charset:", $charset); cubrid_disconnect($conn); ?> The above example will output: CUBRID PHP Version: 9.1.0.0001 PARAM_ISOLATION_LEVEL 3 LOCK_TIMEOUT -1 MAX_STRING_LENGTH 1073741823 PARAM_AUTO_COMMIT 1 Server Info: 9.1.0.0212 Client Info: 9.1.0 CUBRID Charset: iso8859-1 PHP Documentation Group CUBRID_GET_SERVER_INFO(3)
All times are GMT -4. The time now is 06:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy