<?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: echo asterisk in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-asterisk/m-p/4675407#M658769</link>
    <description>&lt;!--!*#--&gt;Your script can be easily rewritten in shell to this:&lt;BR /&gt;&lt;BR /&gt;status | awk '{print $1 " " $3}' &amp;gt; /tmp/tuxob.lst&lt;BR /&gt;&lt;BR /&gt;cat /tmp/tuxob.lst | while read obup srcName&lt;BR /&gt;do&lt;BR /&gt;   if [ "$obup" = '*****' ]&lt;BR /&gt;   then&lt;BR /&gt;      echo "srcName $srcName is down"&lt;BR /&gt;   fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Or:&lt;BR /&gt;grep ' [*][*]*$' /tmp/tuxob.lst | cut -f1&lt;BR /&gt;to do just what you want, display only the lines containing the '*****' at the end.&lt;BR /&gt;And there are lots of other solutions too.&lt;BR /&gt;</description>
    <pubDate>Tue, 17 Aug 2010 05:04:36 GMT</pubDate>
    <dc:creator>Elmar P. Kolkman</dc:creator>
    <dc:date>2010-08-17T05:04:36Z</dc:date>
    <item>
      <title>echo asterisk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-asterisk/m-p/4675403#M658765</link>
      <description>$cat /tmp/tuxob.lst&lt;BR /&gt;udi *****&lt;BR /&gt;jim 10&lt;BR /&gt;ant 19&lt;BR /&gt;ibm *****&lt;BR /&gt;input=`head -1 /tmp/tuxob.lst | awk '{print $NF}'`&lt;BR /&gt;&lt;BR /&gt;If above is the script, then how do I put if conditions. i.e. If $input = '*****' do something. Because on putting $input displays files of current directory being expanded to echo *&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Aug 2010 18:00:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/echo-asterisk/m-p/4675403#M658765</guid>
      <dc:creator>panchpan</dc:creator>
      <dc:date>2010-08-16T18:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: echo asterisk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-asterisk/m-p/4675404#M658766</link>
      <description>&lt;!--!*#--&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;first:&lt;BR /&gt;- no need for command head&lt;BR /&gt;- no need for command echo&lt;BR /&gt;You get your - doubtful - info by&lt;BR /&gt;awk '$NF == "*****" {print $NF;exit}' /tmp/tuxob.lst&lt;BR /&gt;&lt;BR /&gt;I try to guess, what you want:&lt;BR /&gt;if a line has ****** as the second column, do 'something' with the first.&lt;BR /&gt;As an example, I check the name for existence in the NIS database in calling 'ypmatch &lt;COL1&gt; passwd'.&lt;BR /&gt;&lt;BR /&gt;awk '$NF == "*****" {cmd="ypmatch "$1" passwd"; system(cmd)}' /tmp/tuxob.lst&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;&lt;/COL1&gt;</description>
      <pubDate>Mon, 16 Aug 2010 18:20:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/echo-asterisk/m-p/4675404#M658766</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2010-08-16T18:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: echo asterisk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-asterisk/m-p/4675405#M658767</link>
      <description>Thanks Peter.&lt;BR /&gt;I have this code:&lt;BR /&gt;status | awk '{print $1 " " $3}' &amp;gt; /tmp/tuxob.lst&lt;BR /&gt;lines=`wc -l /tmp/tuxob.lst`&lt;BR /&gt;i=1&lt;BR /&gt;while [ $i -le $lines ]&lt;BR /&gt;do&lt;BR /&gt;input=`head -${i} /tmp/tuxob.lst | tail -1`&lt;BR /&gt;obup=`echo $input | awk '{print $2}'`&lt;BR /&gt;srcName=`echo $input | awk '{print $1}'`&lt;BR /&gt;if [ "$obup" = '*****' ]&lt;BR /&gt;then&lt;BR /&gt;echo "srcName is down"&lt;BR /&gt;fi&lt;BR /&gt;i=`expr $i + 1`&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;The file /tmp/tuxob.lst contains:&lt;BR /&gt;udi *****&lt;BR /&gt;jim 10&lt;BR /&gt;ant 19&lt;BR /&gt;ibm *****&lt;BR /&gt;&lt;BR /&gt;and as an output I want to display udi and ibm.&lt;BR /&gt;&lt;BR /&gt;Please advise.&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Aug 2010 18:28:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/echo-asterisk/m-p/4675405#M658767</guid>
      <dc:creator>panchpan</dc:creator>
      <dc:date>2010-08-16T18:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: echo asterisk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-asterisk/m-p/4675406#M658768</link>
      <description>Ok,&lt;BR /&gt;&lt;BR /&gt;let's look, if I understood the 'status' command and your script correctly! Try:&lt;BR /&gt;&lt;BR /&gt;status | awk '$3 == "*****" {print $1,"is down"}'&lt;BR /&gt;&lt;BR /&gt;I feel no need for a temporary file, but if you insist:&lt;BR /&gt;status | awk '$3 == "*****" {print $1,"is down"}&lt;BR /&gt;{print $1,$3 &amp;gt;"/tmp/tuxob.lst"}'&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Mon, 16 Aug 2010 19:29:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/echo-asterisk/m-p/4675406#M658768</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2010-08-16T19:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: echo asterisk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-asterisk/m-p/4675407#M658769</link>
      <description>&lt;!--!*#--&gt;Your script can be easily rewritten in shell to this:&lt;BR /&gt;&lt;BR /&gt;status | awk '{print $1 " " $3}' &amp;gt; /tmp/tuxob.lst&lt;BR /&gt;&lt;BR /&gt;cat /tmp/tuxob.lst | while read obup srcName&lt;BR /&gt;do&lt;BR /&gt;   if [ "$obup" = '*****' ]&lt;BR /&gt;   then&lt;BR /&gt;      echo "srcName $srcName is down"&lt;BR /&gt;   fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Or:&lt;BR /&gt;grep ' [*][*]*$' /tmp/tuxob.lst | cut -f1&lt;BR /&gt;to do just what you want, display only the lines containing the '*****' at the end.&lt;BR /&gt;And there are lots of other solutions too.&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Aug 2010 05:04:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/echo-asterisk/m-p/4675407#M658769</guid>
      <dc:creator>Elmar P. Kolkman</dc:creator>
      <dc:date>2010-08-17T05:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: echo asterisk</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/echo-asterisk/m-p/4675408#M658770</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;As a general comment, if you want to prevent file name generation, disable it with 'set -f'.&lt;BR /&gt;&lt;BR /&gt;For example, compare:&lt;BR /&gt;&lt;BR /&gt;# cd /tmp; echo *&lt;BR /&gt;&lt;BR /&gt;...with:&lt;BR /&gt;&lt;BR /&gt;# cd /tmp; set -f; echo *; set +f&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 08 Sep 2010 13:08:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/echo-asterisk/m-p/4675408#M658770</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-09-08T13:08:12Z</dc:date>
    </item>
  </channel>
</rss>

