Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Display file with escaped color codes Post 302646759 by Corona688 on Friday 25th of May 2012 04:40:55 PM
Old 05-25-2012
Old-fashioned more might be able to do so, as well.
 

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
RSSLite(3pm)						User Contributed Perl Documentation					      RSSLite(3pm)

NAME
XML::RSSLite - lightweight, "relaxed" RSS (and XML-ish) parser SYNOPSIS
use XML::RSSLite; . . . parseRSS(\%result, $content); print "=== Channel === ", "Title: $result{'title'} ", "Desc: $result{'description'} ", "Link: $result{'link'} "; foreach $item (@{$result{'item'}}) { print " --- Item --- ", " Title: $item->{'title'} ", " Desc: $item->{'description'} ", " Link: $item->{'link'} "; } DESCRIPTION
This module attempts to extract the maximum amount of content from available documents, and is less concerned with XML compliance than alternatives. Rather than rely on XML::Parser, it uses heuristics and good old-fashioned Perl regular expressions. It stores the data in a simple hash structure, and "aliases" certain tags so that when done, you can count on having the minimal data necessary for re-constructing a valid RSS file. This means you get the basic title, description, and link for a channel and its items. This module extracts more usable links by parsing "scriptingNews" and "weblog" formats in addition to RDF & RSS. It also "sanitizes" the output for best results. The munging includes: Remove html tags to leave plain text Remove characters other than 0-9~!@#$%^&*()-+=a-zA-Z[];',.:"<>?s Remove leading whitespace from URIs Use <url> tags when <link> is empty Use misplaced urls in <title> when <link> is empty Exract links from <a href=...> if required Limit links to ftp and http(s) Join relative item urls (beginning with / or #) to the site base EXPORT parseRSS($outHashRef, $inScalarRef) $inScalarRef is a reference to a scalar containing the document to be parsed, the contents will effectively be destroyed. $outHashRef is a reference to the hash within which to store the parsed content. EXPORTABLE parseXML(\%parsedTree, $parseThis, 'topTag', $comments); parsedTree - required Reference to hash to store the parsed document within. parseThis - required Reference to scalar containing the document to parse. topTag - optional Tag to consider the root node, leaving this undefined is not recommended. comments - optional false will remove contents from parseThis true will not remove comments from parseThis array reference is true, comments are stored here CAVEATS This is not a conforming parser. It does not handle the following o <foo bar=">"> o <foo><bar> <bar></bar> <bar></bar> </bar></foo> o <![CDATA[ ]]> o PI It's non-validating, without a DTD the following cannot be properly addressed entities namespaces This may or may not be arriving in some future release. SEE ALSO
perl(1), "XML::RSS", "XML::SAX::PurePerl", "XML::Parser::Lite", <XML::Parser> AUTHOR
Jerrad Pierce <jpierce@cpan.org>. Scott Thomason <scott@thomasons.org> LICENSE
Portions Copyright (c) 2002,2003,2009 Jerrad Pierce, (c) 2000 Scott Thomason. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-10-25 RSSLite(3pm)
All times are GMT -4. The time now is 05:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy