<?xml version="1.0" encoding="windows-1252"?>
<node id="221538" title="Re: Stupid console tricks (or color highlighted tail)" created="2002-12-20 18:42:59" updated="2005-08-13 14:08:11">
<type id="11">
note</type>
<author id="115693">
tstock</author>
<data>
<field name="doctext">
asking for console tips on windows XP... that's funny :)
&lt;br&gt;&lt;br&gt;
To cat a log file and see error lines in red over black, I would could use this on my machine (linux):

&lt;code&gt;
perl -ne 'print /ERROR/ ? "\033[1;31m\033[40m$_\033[0m" : $_ ' my.log
&lt;/code&gt;

A cool trick I use to follow a log file is use 'less my.log', /searchstring, SHIFT+f
&lt;br&gt;&lt;br&gt;
now not only can I jump between a less and a tail -f, but also the searchstring is highlighted everytime it shows up.
&lt;br&gt;&lt;br&gt;
tstock
&lt;br&gt;&lt;br&gt;
update:&lt;BR&gt;silly rotating star:

&lt;code&gt;
 perl -e 'print "\b" . substr("|/-\\", time % 4, 1 ) while 1'
&lt;/code&gt;</field>
<field name="root_node">
221475</field>
<field name="parent_node">
221475</field>
</data>
</node>
