Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Using color escape codes in less Post 302239697 by Source2Exe on Wednesday 24th of September 2008 09:06:37 AM
Old 09-24-2008
OK. At last, success.
This is the only thing that is working, 100% to my satisfaction.

nohup less +F /var/log/Server.log | /usr/local/src/Colorlogs/colorlogs.pl > takethis.log &

less +F -f -R takethis.log


This works wonderfully.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

escape codes

I did a search and found the link for escape codes,- but I am not sure how to modify this script to set the margins. I started with a script that was already written on my system to set a printer to print landscape. I need to send an report that is in an ascii file to multiple printers from my... (1 Reply)
Discussion started by: MizzGail
1 Replies

2. Ubuntu

rdiff-backup using escape codes on vfat thumbdrive

I thought it may be nice to use rdiff-backup to backup my websites to a thumb drive. But all the capital letters are substituted with octal escape codes. How can I over come this? There are no issues backing up to another ext3 drive. The source drive is ext3 the thumb drive is vfat mounted... (0 Replies)
Discussion started by: mikemc
0 Replies

3. UNIX for Dummies Questions & Answers

Regular expression on hex color codes

I want to have all hex color codes in a given stylesheet in uppercase, so #fff should be converted to #FFF for instance. Here is the regular expression I use to match and convert hex color codes to uppercase: sed -e 's/^#({3}$)|({6}$)/^#({3}$)|({6}$)/' main.css However, no conversion to uppercase... (6 Replies)
Discussion started by: figaro
6 Replies

4. Shell Programming and Scripting

'watch' not interpreting escape codes in bash script

Hi there, I'm fairly new to bash scripting and already having some troubles. I'm making a script that can print some series of strings in colors based in the information of a file, for simplicity let's say it only does: #!/bin/bash printf "\eWhen you execute this in the command line it... (1 Reply)
Discussion started by: Arashi
1 Replies

5. UNIX for Advanced & Expert Users

CUPS printing and control escape codes

I ported application from SysV to Linux and run into troubles with printing. Application uses lp and HP JetDirect-based printers, it inserts HP control codes in the file and uses plain lp -d dest doc-file command to print it. The Linux (Ubuntu 8) has CUPS system, which I am not familiar... (0 Replies)
Discussion started by: migurus
0 Replies

6. Programming

Using ANSI color codes in gcc compiled program

I have put some yellow color codes and works well. I call the funstion using print_usage(stderr, 0); I would like to know if there is any way, to store the ansi color codes in variables and then call them inside fprintf. Or have a format followed by the strings I want to output. ... (5 Replies)
Discussion started by: kristinu
5 Replies

7. UNIX for Dummies Questions & Answers

Display file with escaped color codes

Hi, I have a file containing color codes: Fri May 25 17:13:04 2012: Starting MTA: exim4^ Loading cpufreq kernel modules...^How can I display it colorized on a linux terminal? (4 Replies)
Discussion started by: ripat
4 Replies

8. Shell Programming and Scripting

Help with awk color codes based on condition

HI i have two files say test and test1 Test.txt Code: Lun01 2TB 1.99TB 99.6% Lun02 2TB 1.99TB 99.5% Lun03 2TB 1.99TB 99.5% Lun04 2TB 1.55TB 89.6% Code: Test1.txt Lun01 2TB 1.99TB 89.5% Lun02 2TB 1.99TB 99.5% Lun03 2TB 1.99TB 99.5% Requirement is to compare... (6 Replies)
Discussion started by: venkitesh
6 Replies
NCURSES_INIT_COLOR(3)							 1						     NCURSES_INIT_COLOR(3)

ncurses_init_color - Define a terminal color

SYNOPSIS
int ncurses_init_color (int $color, int $r, int $g, int $b) DESCRIPTION
Defines or redefines the given color. When this function is called, all occurrences of the given color on the screen, if any, immediately change to the new definition. Color capabilities must be supported by the terminal and initialized using ncurses_start_color(3) prior to calling this function. In addi- tion, the terminal must have color changing capabilities; use ncurses_can_change_color(3) to check for this. PARAMETERS
o $color - The identification number of the color to redefine. It may be one of the default color constants. o $r - A color value, between 0 and 1000, for the red component. o $g - A color value, between 0 and 1000, for the green component. o $b - A color value, between 0 and 1000, for the blue component. RETURN VALUES
Returns -1 if the function was successful, and 0 if ncurses or terminal color capabilities have not been initialized or the terminal does not have color changing capabilities. SEE ALSO
ncurses_color_content(3), ncurses_start_color(3). PHP Documentation Group NCURSES_INIT_COLOR(3)
All times are GMT -4. The time now is 03:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy