<?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 write with color in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/write-with-color/m-p/2991326#M913784</link>
    <description>Hello!&lt;BR /&gt;&lt;BR /&gt;How can i write in the terminal (xterm)&lt;BR /&gt;with colors.&lt;BR /&gt;I write a script that read a file and it&lt;BR /&gt;must write some lines with color.&lt;BR /&gt;How can i do it?&lt;BR /&gt;I use HPUX 11.0, i can write sh, perl, c&lt;BR /&gt;no metter just to get the efect.&lt;BR /&gt;&lt;BR /&gt;Caesar</description>
    <pubDate>Fri, 06 Jun 2003 18:16:08 GMT</pubDate>
    <dc:creator>Caesar_3</dc:creator>
    <dc:date>2003-06-06T18:16:08Z</dc:date>
    <item>
      <title>write with color</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/write-with-color/m-p/2991326#M913784</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;How can i write in the terminal (xterm)&lt;BR /&gt;with colors.&lt;BR /&gt;I write a script that read a file and it&lt;BR /&gt;must write some lines with color.&lt;BR /&gt;How can i do it?&lt;BR /&gt;I use HPUX 11.0, i can write sh, perl, c&lt;BR /&gt;no metter just to get the efect.&lt;BR /&gt;&lt;BR /&gt;Caesar</description>
      <pubDate>Fri, 06 Jun 2003 18:16:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/write-with-color/m-p/2991326#M913784</guid>
      <dc:creator>Caesar_3</dc:creator>
      <dc:date>2003-06-06T18:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: write with color</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/write-with-color/m-p/2991327#M913785</link>
      <description>ncurses&lt;BR /&gt;&lt;BR /&gt;There are Perl modules, C libraries, and C++ libraries for this.&lt;BR /&gt;&lt;BR /&gt;I'd recommend you get a book though, it's tricky at best.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Shannon</description>
      <pubDate>Fri, 06 Jun 2003 18:21:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/write-with-color/m-p/2991327#M913785</guid>
      <dc:creator>Shannon Petry</dc:creator>
      <dc:date>2003-06-06T18:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: write with color</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/write-with-color/m-p/2991328#M913786</link>
      <description>Caesar - I know what you mean.  I too wish that HP-UX would use colors (like linux does).&lt;BR /&gt;&lt;BR /&gt;The best  I can tell you is how to highlight a string of text.&lt;BR /&gt;&lt;BR /&gt;at the beginning of your script put these two lines:&lt;BR /&gt;&lt;BR /&gt;BOLD="`tput smso`"&lt;BR /&gt;NORMAL="`tput rmso`"&lt;BR /&gt;&lt;BR /&gt;Then to make something bold (highlighted) do it like this:&lt;BR /&gt;&lt;BR /&gt;echo "${BOLD}bla bla bla${NORMAL}"&lt;BR /&gt;&lt;BR /&gt;and "bla bla bla" will be highlighted.</description>
      <pubDate>Fri, 06 Jun 2003 18:29:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/write-with-color/m-p/2991328#M913786</guid>
      <dc:creator>John Meissner</dc:creator>
      <dc:date>2003-06-06T18:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: write with color</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/write-with-color/m-p/2991329#M913787</link>
      <description>Hi Caesar:&lt;BR /&gt;&lt;BR /&gt;I think that the best you can do is bold or blink. Check this out:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xec0e36e69499d611abdb0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xec0e36e69499d611abdb0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;DR</description>
      <pubDate>Fri, 06 Jun 2003 18:43:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/write-with-color/m-p/2991329#M913787</guid>
      <dc:creator>Dario_1</dc:creator>
      <dc:date>2003-06-06T18:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: write with color</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/write-with-color/m-p/2991330#M913788</link>
      <description>man terminfo&lt;BR /&gt;&lt;BR /&gt;The tput command can generate a terminal-specific escape sequence for any of the features listed for the terminfo database entry of that terminal. To see what is defined for the current terminal:&lt;BR /&gt;&lt;BR /&gt;untic $TERM&lt;BR /&gt;&lt;BR /&gt;In all cases, $TERM  must match the terminal you are using. If your profile sets $TERM using ttytype, then the untic command will show the features available for that terminal. Decode the untic entries using the man page for terminfo (which defines the curses library calls).</description>
      <pubDate>Fri, 06 Jun 2003 21:46:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/write-with-color/m-p/2991330#M913788</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-06-06T21:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: write with color</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/write-with-color/m-p/2991331#M913789</link>
      <description>Thanks for the help!&lt;BR /&gt;&lt;BR /&gt;Caesar</description>
      <pubDate>Fri, 13 Jun 2003 16:08:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/write-with-color/m-p/2991331#M913789</guid>
      <dc:creator>Caesar_3</dc:creator>
      <dc:date>2003-06-13T16:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: write with color</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/write-with-color/m-p/2991332#M913790</link>
      <description>here are some example tputs to set colors.&lt;BR /&gt;&lt;BR /&gt;# sets parameters for highlighting or colorizing text&lt;BR /&gt;bold="$(tput smso 2&amp;gt;/dev/null)"&lt;BR /&gt;undl="$(tput smul 2&amp;gt;/dev/null)"&lt;BR /&gt;norm="$(tput rmso 2&amp;gt;/dev/null)"&lt;BR /&gt;&lt;BR /&gt;bla="$(tput setaf 0 2&amp;gt;/dev/null)"&lt;BR /&gt;red="$(tput setaf 1 2&amp;gt;/dev/null)"&lt;BR /&gt;gre="$(tput setaf 2 2&amp;gt;/dev/null)"&lt;BR /&gt;yel="$(tput setaf 3 2&amp;gt;/dev/null)"&lt;BR /&gt;blu="$(tput setaf 4 2&amp;gt;/dev/null)"&lt;BR /&gt;pur="$(tput setaf 5 2&amp;gt;/dev/null)"&lt;BR /&gt;cya="$(tput setaf 6 2&amp;gt;/dev/null)"&lt;BR /&gt;whi="$(tput setaf 7 2&amp;gt;/dev/null)"&lt;BR /&gt;&lt;BR /&gt;off="$(tput sgr0 2&amp;gt;/dev/null)"&lt;BR /&gt;HI="$(tput smso 2&amp;gt;/dev/null)"&lt;BR /&gt;LO="$(tput sgr0 2&amp;gt;/dev/null)"&lt;BR /&gt;&lt;BR /&gt;but as bill pointed out, these are terminal specific esacape sequences.  and xterm doesn't have any.  these will work for a dtterm.  you'll have to test what capabilities the terminal has and set values appropriately.  such as for an xterm you could use bold for yellow and bold inverse for red and underline for blue, etc.  This way if someone is using an xterm there is some differentiation in the visual presentation albeit not colors. and if someone is using an dtterm their visual presentation would be differentiated by colors.</description>
      <pubDate>Fri, 13 Jun 2003 16:49:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/write-with-color/m-p/2991332#M913790</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2003-06-13T16:49:48Z</dc:date>
    </item>
  </channel>
</rss>

