Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Display file with escaped color codes Post 302647931 by ripat on Tuesday 29th of May 2012 05:40:06 AM
Old 05-29-2012
They both work, and cat as wel, as soon as the ^[ character is changed in octal 033.

Thanks.
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to have color coded Terminal display,(like linux)

Hi all, I would like to know how to have a color display in the terminal... In the sense that, In many linux terminals,we have color coded for each file type, green for executable ,blue for dirs and so on... I wanted to know how i can have the same arrangement in solaris(b-79a) I am not... (5 Replies)
Discussion started by: wrapster
5 Replies

2. UNIX for Dummies Questions & Answers

Using color escape codes in less

Hi all, Not sure how "for dummies" this question is, but I'd better use understatement... A. My Environment ============== I am using RedHat Linux, version 2.6.18-53.el5. When I type less --version I get: less 394 Copyright (C) 1984-2005 Mark Nudelman ... My terminal is configured... (1 Reply)
Discussion started by: Source2Exe
1 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. UNIX for Dummies Questions & Answers

Display Console errors in Red color

I browsed the forums but i couldn't find the best answer.so,i'm posting here again.. I have a parent bash script which calls another child script and the child script is used to deploy the tar file using weblogic deployer. The script is used to display the output on the console and sent to a log... (5 Replies)
Discussion started by: ramse8pc
5 Replies

5. 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

6. 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
term(4) 						     Kernel Interfaces Manual							   term(4)

NAME
term - format of compiled term file SYNOPSIS
DESCRIPTION
Compiled terminfo descriptions are placed under the directory In order to avoid a linear search of a huge HP-UX system directory, a two- level scheme is used: where name is the name of the terminal, and c is the first character of name. Thus, can be found in the file Syn- onyms for the same terminal are implemented by multiple links to the same compiled file. The format has been chosen so that it is the same on all hardware. An 8-bit or longer byte is assumed, but no assumptions about byte ordering or sign extension are made. The compiled file is created using the program (see tic(1M)), and read by the routine. The file is divided into the following six parts: 1. The header section begins the file and contains six short integers in the following format: 1. Magic number (octal 0432); 2. Size, in bytes, of the names section; 3. Number of bytes in the Boolean section; 4. Number of short integers in the numbers section; 5. Number of offsets (short integers) in the strings section; 6. Size, in bytes, of the string table. Short integers are stored in two 8-bit bytes. The first byte contains the least significant 8 bits of the value; the second byte contains the most significant 8 bits. (Thus, the value represented is 256*second+first.) The value -1 is represented by other negative values are illegal. The -1 generally means that a capability is missing from this terminal. Note that this format corresponds to the hardware of the VAX and PDP-11. Machines where this does not correspond to the hardware read the integers as two bytes and compute the result. 2. The terminal names section comes next. It contains the first line of the terminfo description, listing the various names for the terminal, separated by the character. The section is terminated with an ASCII NUL character. 3. In the Boolean section, the Boolean flags have one byte for each flag. This byte is either or as the flag is absent or present, respectively. The capabilities are in the same order as they are listed in the file Between the Boolean section and the number section, a null byte will be inserted, if necessary, to ensure that the number section begins on an even byte. All short integers are aligned on a short word boundary. 4. The numbers section is similar to the flags section. Each capability consists of two bytes, and is stored as a short inte- ger. If the value represented is -1, the capability is considered missing. 5. The strings section is also similar. Each capability is stored as a short integer in the format above. A value of -1 means the capability is missing. Otherwise, the value is taken as an offset from the beginning of the string table. Special char- acters in or notation are stored in their interpreted form, not the printing representation. Padding information and parame- ter information are stored intact in uninterpreted form. 6. The final section is the string table. It contains all the values of string capabilities referenced in the string section. Each string is null terminated. Note that it is possible for to expect a different set of capabilities than are actually present in the file. Either the database might have been updated since has been recompiled (resulting in extra unrecognized entries in the file) or the program may have been recompiled more recently than the database was updated (resulting in missing entries). The routine must be prepared for both possibilities, which is why the numbers and sizes are included. Also, new capabilities must always be added at the end of the lists of Boolean, number, and string capabilities. The following example is an octal dump of the description for the HP Portable Computer (HP-110): 110|hp110|hp110a portable computer, am, xhp, da, db, mir, cols#80, lines#16, lm#0, cbt=Ei, bel=^G, cr= , tbc=E3, clear=E&a0y0CEJ, el=EK, ed=EJ, hpa=E&a%p1%dC, cup=E&a%p1%dy%p2%dC, cud1=EB, cub1=, cuf1=EC, cuu1=EA, cvvis=E&j@, dch1=EP, dl1=EM, smir=EQ, smso=E&dB, sgr0=E&d@, rmir=ER, rmso=E&d@, is2=E&j@, if=/usr/share/lib/tabset/stdcrt, il1=EL, kbs=, kcud1=EB, khome=Eh, kcub1=ED, kcuf1=EC, kcuu1=EA, rmkx=E&s0A, smkx=E&s1A, vpa=E&a%p1%dY, ind= , hts=E1, ht= , 0000 032 001 # 025  223 254 1 1 0 | 0020 h p 1 1 0 | h p 1 1 0 a p o r 0040 t a b l e c o m p u t e r 0060 001 001 001 001 001 0100 P 377 377 020 377 377 377 377 0120 377 377 377 377 003 005 377 377 007 0140 024 027 032 377 377 $ 4 377 377 377 377 0160 7 377 377 377 377 9 377 377 < ? D 0200 G 377 377 377 377 377 377 377 377 377 377 377 377 377 377 0220 377 377 J 377 377 377 377 377 377 M 377 377 377 377 0240 377 377 R 377 377 377 377 W Z 377 377 377 377 0260 377 377 377 377 377 377 _ 377 377 d 377 377 { 0300 377 377 ~ 377 377 377 377 377 377 377 377 377 377 200 0320 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 0340 377 377 377 377 377 377 377 377 377 377 377 377 203 377 377 0360 377 377 206 377 377 377 377 377 377 211 377 377 377 377 0400 377 377 214 217 225 377 377 377 377 377 377 377 377 0420 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 0520 377 377 233 377 377 245 377 377 377 377 247 377 377 0540 252 377 377 377 377 377 377 377 377 377 377 377 377 377 377 0560 377 377 377 377 377 377 377 377 377 377 033 i 007 0600 033 3 033 & a 0 y 0 C 033 J 033 K 0620 033 J 033 & a % p 1 % d C 033 & 0640 a % p 1 % d y % p 2 % d C 033 B 0660  033 C 033 A 033 & j @ 033 P 0700 033 M 033 Q 033 & d B 033 & d @ 0720 033 R 033 & d @ 033 & j @ / u 0740 s r / l i b / t a b s e t / s t 0760 d c r t 033 L  033 B 033 h 1000 033 D 033 C 033 A 033 & s 0 A 033 1020 & s 1 A 033 & a % p 1 % d Y 1040 033 1 1046 WARNINGS
Total compiled entries cannot exceed 4096 bytes. The name field cannot exceed 128 bytes. Hewlett-Packard Company supports only those terminals that are listed on the current list of supported devices. However, both non-sup- ported and supported terminals may be in the terminfo database. If non-supported terminals are used, they may not work correctly. FILES
compiled terminal capability data base SEE ALSO
tic(1M), untic(1M), terminfo(4). term(4)
All times are GMT -4. The time now is 09:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy