<?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: Hp-ux B.11.11 ksh Scripting . in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475407#M212451</link>
    <description>Why be AWKward?&lt;BR /&gt;grep ^[89][0-9] marks.txt &amp;gt; highmarks.txt&lt;BR /&gt;&lt;BR /&gt;or, if you want them in order:&lt;BR /&gt;grep ^[89][0-9] marks.txt|sort -n &amp;gt; highmarks.txt&lt;BR /&gt;</description>
    <pubDate>Wed, 02 Feb 2005 06:21:49 GMT</pubDate>
    <dc:creator>Gordon  Morrison</dc:creator>
    <dc:date>2005-02-02T06:21:49Z</dc:date>
    <item>
      <title>Hp-ux B.11.11 ksh Scripting .</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475402#M212446</link>
      <description>Hi I need help for finding out the persons, marks achived , more than 80.&lt;BR /&gt;&lt;BR /&gt;Hp-UX B.11.11 U 9000/800  /usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;file name: marks.txt&lt;BR /&gt;&lt;BR /&gt;93 Steeve &lt;BR /&gt;72 Brocar&lt;BR /&gt;43 Minsen&lt;BR /&gt;22 Wilsen&lt;BR /&gt;77 David&lt;BR /&gt;99 Terence&lt;BR /&gt;82 Dave&lt;BR /&gt;89 Stuwart&lt;BR /&gt;78 Vivek&lt;BR /&gt;89 Paul&lt;BR /&gt;93 Ravi&lt;BR /&gt;95 Richard&lt;BR /&gt;&lt;BR /&gt;How to write a script for that , &lt;BR /&gt;I want listing of those name , who is greater than 80.&lt;BR /&gt;&lt;BR /&gt;Does awk or sed help me. &lt;BR /&gt;&lt;BR /&gt;Many Thanks in Advance,&lt;BR /&gt;&lt;BR /&gt;Raj.&lt;BR /&gt;----&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Feb 2005 03:34:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475402#M212446</guid>
      <dc:creator>Raj D.</dc:creator>
      <dc:date>2005-02-01T03:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Hp-ux B.11.11 ksh Scripting .</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475403#M212447</link>
      <description>cat filename|awk '{ if ($1 &amp;gt; 79) print $2}'&lt;BR /&gt;&lt;BR /&gt;Regds,&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
      <pubDate>Tue, 01 Feb 2005 03:39:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475403#M212447</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2005-02-01T03:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Hp-ux B.11.11 ksh Scripting .</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475404#M212448</link>
      <description>&lt;BR /&gt;Hey Kapil ,&lt;BR /&gt;&lt;BR /&gt;Thanks , thats works fine. &lt;BR /&gt;but can i save the result  in a file. &lt;BR /&gt;Do i need to do &amp;gt;&amp;gt; or can i use something inside awk.&lt;BR /&gt;&lt;BR /&gt;Thanks so much ,&lt;BR /&gt;&lt;BR /&gt;RajD.&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Feb 2005 04:04:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475404#M212448</guid>
      <dc:creator>Raj D.</dc:creator>
      <dc:date>2005-02-01T04:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Hp-ux B.11.11 ksh Scripting .</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475405#M212449</link>
      <description>Yes you can simply redirect stdout in append mode.&lt;BR /&gt;Btw. the prepending cat is redundant.&lt;BR /&gt; &lt;BR /&gt;Since TIMTOWTDI here's a Perl variant that will give you a sorted list of top seats exceeding 80 points&lt;BR /&gt; &lt;BR /&gt;perl -e 'map{printf"%s\t%u\n",@{$_}[1,0]}sort{$b-&amp;gt;[0]&amp;lt;=&amp;gt;$a-&amp;gt;[0]}grep $_-&amp;gt;[0]&amp;gt;80,map[/(\d+)\s+(\w+)/],&amp;lt;&amp;gt;' /path/to/inputdata</description>
      <pubDate>Tue, 01 Feb 2005 04:28:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475405#M212449</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2005-02-01T04:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Hp-ux B.11.11 ksh Scripting .</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475406#M212450</link>
      <description>cat filename|awk '{ if ($1 &amp;gt; 79) print $2}' &amp;gt; filename.out&lt;BR /&gt;&lt;BR /&gt;Regds,&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
      <pubDate>Tue, 01 Feb 2005 04:31:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475406#M212450</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2005-02-01T04:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Hp-ux B.11.11 ksh Scripting .</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475407#M212451</link>
      <description>Why be AWKward?&lt;BR /&gt;grep ^[89][0-9] marks.txt &amp;gt; highmarks.txt&lt;BR /&gt;&lt;BR /&gt;or, if you want them in order:&lt;BR /&gt;grep ^[89][0-9] marks.txt|sort -n &amp;gt; highmarks.txt&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Feb 2005 06:21:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475407#M212451</guid>
      <dc:creator>Gordon  Morrison</dc:creator>
      <dc:date>2005-02-02T06:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Hp-ux B.11.11 ksh Scripting .</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475408#M212452</link>
      <description>Hi Raj,&lt;BR /&gt;I like "read":&lt;BR /&gt;&lt;BR /&gt;cat test.in | \&lt;BR /&gt;while read a b&lt;BR /&gt;do&lt;BR /&gt;if [ $a -ge 80 ] ; then&lt;BR /&gt;echo $a $b&lt;BR /&gt;fi&lt;BR /&gt;done | \&lt;BR /&gt;sort -n&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;Bob</description>
      <pubDate>Wed, 02 Feb 2005 14:02:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475408#M212452</guid>
      <dc:creator>Robert Dill</dc:creator>
      <dc:date>2005-02-02T14:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Hp-ux B.11.11 ksh Scripting .</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475409#M212453</link>
      <description>&lt;!--!*#--&gt;I like also read, so:&lt;BR /&gt;&lt;BR /&gt;while read rank name; do&lt;BR /&gt;if [ $rank -gt 79 ]; then&lt;BR /&gt;    echo "${rank} ${name}"&lt;BR /&gt;fi&lt;BR /&gt;done&lt;INPUT_FILE&gt;&lt;/INPUT_FILE&gt;&lt;BR /&gt;Note for awk:&lt;BR /&gt;no need to cat the input file&lt;BR /&gt;&lt;BR /&gt;awk '{ if ($1 &amp;gt; 79) print $2}' input_file &amp;gt; output_file</description>
      <pubDate>Thu, 08 Mar 2007 06:42:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475409#M212453</guid>
      <dc:creator>Stefan Murariu</dc:creator>
      <dc:date>2007-03-08T06:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Hp-ux B.11.11 ksh Scripting .</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475410#M212454</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Using 'cat' to read and then piping its output to 'awk' or a shell 'read' loop is a needless, utter *waste* of a process.&lt;BR /&gt;&lt;BR /&gt;Instead of:&lt;BR /&gt;&lt;BR /&gt;# cat filename|awk '{if ($1 &amp;gt; 79) print $2}'&lt;BR /&gt;&lt;BR /&gt;Do:&lt;BR /&gt;&lt;BR /&gt;# awk '{if ($1 &amp;gt; 79) print $2}' filename&lt;BR /&gt;&lt;BR /&gt;Instead of:&lt;BR /&gt;&lt;BR /&gt;# cat file | \&lt;BR /&gt;while read a b&lt;BR /&gt;do&lt;BR /&gt;    ...&lt;BR /&gt;done | sort&lt;BR /&gt;&lt;BR /&gt;Do:&lt;BR /&gt;&lt;BR /&gt;# while read a b&lt;BR /&gt;do&lt;BR /&gt;done &amp;lt; file | sort&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Mar 2007 08:07:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475410#M212454</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-03-08T08:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hp-ux B.11.11 ksh Scripting .</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475411#M212455</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;@Gordon, @Stefan: what about&lt;BR /&gt;100 Gordon&lt;BR /&gt;&lt;BR /&gt;in connection with '/[89]...' ?&lt;BR /&gt;&lt;BR /&gt;I fell better with the compare operator '&amp;gt;'.&lt;BR /&gt;mfG Peter</description>
      <pubDate>Thu, 08 Mar 2007 09:08:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hp-ux-b-11-11-ksh-scripting/m-p/3475411#M212455</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2007-03-08T09:08:16Z</dc:date>
    </item>
  </channel>
</rss>

