<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Keywords patterns with different colors in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/keywords-patterns-with-different-colors/m-p/6714218#M497014</link>
    <description>&lt;P&gt;Nothing like that in HP-UX.&lt;/P&gt;&lt;P&gt;You would first have to determine what type of terminal you are using, as in:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does it support color? There are HUNDREDS of terminal types listed in &lt;STRONG&gt;/usr/lib/terminfo&lt;/STRONG&gt;. A vt100 terminal never had any color except white. If you are not using a real terminal, but a terminal emulator on a PC such as PuTTY or Reflection or hpterm or xterm, etc, then check to see whether there are color enhancements available. Some terminal emulators support ANSI colors, many do not, specfically HP terminals and emulators which have proprietary color codes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there are color enhancements available, many (not all) of the terminals listed in &lt;STRONG&gt;terminfo&lt;/STRONG&gt; have their escape sequences defined in the &lt;STRONG&gt;terminfo&lt;/STRONG&gt; files. You'll need to read the document: &lt;STRONG&gt;man terminfo&lt;/STRONG&gt; to find the various color codes (&lt;STRONG&gt;Cap name&lt;/STRONG&gt;), then use the &lt;STRONG&gt;tput&lt;/STRONG&gt; command to form the sequence to start a color and then end a color.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once you've got the color selection codes, you would then have to wrapper all the output sent to your screen to look for the keywords and insert the codes before and after each word.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And of course, this feature will be restricted to terminals that correctly identify themselves (ie, forcing &lt;STRONG&gt;TERM=vt100&lt;/STRONG&gt; is a bad idea).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Feb 2015 20:40:22 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2015-02-27T20:40:22Z</dc:date>
    <item>
      <title>Keywords patterns with different colors</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/keywords-patterns-with-different-colors/m-p/6714086#M497013</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;does anyone can tell me if this is possible and if it is how?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to set groups of keywords and set color for each group, so everytime I ran grep;cat; more; tail I can quickly see the words.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example&lt;/P&gt;
&lt;P&gt;a critical group with words like: "error"; "exception"; "NOK"&amp;nbsp;as red&lt;/P&gt;
&lt;P&gt;warning group as orange or yellow: "warning"; "advise"; "incorrect"&lt;/P&gt;
&lt;P&gt;and other group green: "correct"; "OK"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've seen this working in IBM AIX, but don't know how neither if it is possible in HP-UX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Diogo Rodrigues&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. This thread has been moved&amp;nbsp;from HP-UX &amp;gt; Training &amp;amp; Education to HP-UX &amp;gt; languages. - Hp Forum Moderator&lt;/P&gt;</description>
      <pubDate>Sat, 28 Feb 2015 03:52:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/keywords-patterns-with-different-colors/m-p/6714086#M497013</guid>
      <dc:creator>siulogoid</dc:creator>
      <dc:date>2015-02-28T03:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords patterns with different colors</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/keywords-patterns-with-different-colors/m-p/6714218#M497014</link>
      <description>&lt;P&gt;Nothing like that in HP-UX.&lt;/P&gt;&lt;P&gt;You would first have to determine what type of terminal you are using, as in:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does it support color? There are HUNDREDS of terminal types listed in &lt;STRONG&gt;/usr/lib/terminfo&lt;/STRONG&gt;. A vt100 terminal never had any color except white. If you are not using a real terminal, but a terminal emulator on a PC such as PuTTY or Reflection or hpterm or xterm, etc, then check to see whether there are color enhancements available. Some terminal emulators support ANSI colors, many do not, specfically HP terminals and emulators which have proprietary color codes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there are color enhancements available, many (not all) of the terminals listed in &lt;STRONG&gt;terminfo&lt;/STRONG&gt; have their escape sequences defined in the &lt;STRONG&gt;terminfo&lt;/STRONG&gt; files. You'll need to read the document: &lt;STRONG&gt;man terminfo&lt;/STRONG&gt; to find the various color codes (&lt;STRONG&gt;Cap name&lt;/STRONG&gt;), then use the &lt;STRONG&gt;tput&lt;/STRONG&gt; command to form the sequence to start a color and then end a color.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once you've got the color selection codes, you would then have to wrapper all the output sent to your screen to look for the keywords and insert the codes before and after each word.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And of course, this feature will be restricted to terminals that correctly identify themselves (ie, forcing &lt;STRONG&gt;TERM=vt100&lt;/STRONG&gt; is a bad idea).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Feb 2015 20:40:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/keywords-patterns-with-different-colors/m-p/6714218#M497014</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2015-02-27T20:40:22Z</dc:date>
    </item>
  </channel>
</rss>

