<?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: AWK again... in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729768#M835981</link>
    <description>Hi &lt;BR /&gt;&lt;BR /&gt;you may wish to sort this into ascending order too.&lt;BR /&gt;&lt;BR /&gt;cat file1 | awk '{ if ($1 &amp;gt; 40000) print $2 }' | sort +n +0&lt;BR /&gt;&lt;BR /&gt;cheers&lt;BR /&gt;John.</description>
    <pubDate>Thu, 23 May 2002 06:16:32 GMT</pubDate>
    <dc:creator>John Carr_2</dc:creator>
    <dc:date>2002-05-23T06:16:32Z</dc:date>
    <item>
      <title>AWK again...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729766#M835979</link>
      <description>Hi,&lt;BR /&gt;I have the text file in the format below:&lt;BR /&gt;#cat file1.txt&lt;BR /&gt;23400 joe_bloggs&lt;BR /&gt;56690 sunny_lee&lt;BR /&gt;56789 terrence_lam&lt;BR /&gt;&lt;BR /&gt;The left most column represent the disk-usage by the the users on the right column, i.e. their home directory disk usage.&lt;BR /&gt;I would like to display only users &amp;gt;40MB i.e 40000k of space into a different file. I did the following:&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;for i in `cat file1`&lt;BR /&gt;do &lt;BR /&gt;   if($1 &amp;gt; 40000)&lt;BR /&gt;       echo $1 $2 &amp;gt;&amp;gt; list.txt&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;It produced the following error:&lt;BR /&gt;Syntax error at line 3: ')' is not expected&lt;BR /&gt;&lt;BR /&gt;I had also tried the one below on the console:&lt;BR /&gt;#cat file1 | awk `{if($1&amp;gt;40000)}{print $1 $2}`&lt;BR /&gt;&lt;BR /&gt;and it produced the same kind of error.&lt;BR /&gt;&lt;BR /&gt;Can someone help me out in this?&lt;BR /&gt;Thanks. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 23 May 2002 05:17:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729766#M835979</guid>
      <dc:creator>Chern Jian Leaw</dc:creator>
      <dc:date>2002-05-23T05:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: AWK again...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729767#M835980</link>
      <description>Hi,&lt;BR /&gt;Something like&lt;BR /&gt;cat file1 | awk '{ if ($1 &amp;gt; 40000) print $2 }'&lt;BR /&gt;might do the trick&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Tom</description>
      <pubDate>Thu, 23 May 2002 05:27:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729767#M835980</guid>
      <dc:creator>Tom Geudens</dc:creator>
      <dc:date>2002-05-23T05:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: AWK again...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729768#M835981</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;you may wish to sort this into ascending order too.&lt;BR /&gt;&lt;BR /&gt;cat file1 | awk '{ if ($1 &amp;gt; 40000) print $2 }' | sort +n +0&lt;BR /&gt;&lt;BR /&gt;cheers&lt;BR /&gt;John.</description>
      <pubDate>Thu, 23 May 2002 06:16:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729768#M835981</guid>
      <dc:creator>John Carr_2</dc:creator>
      <dc:date>2002-05-23T06:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: AWK again...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729769#M835982</link>
      <description>Don't forget you'll need to print out both fields for the sort:&lt;BR /&gt;&lt;BR /&gt;awk '$1&amp;gt;40000{ print }' filename | sort +0n &lt;BR /&gt;&lt;BR /&gt;Rgds, Robin.</description>
      <pubDate>Thu, 23 May 2002 07:04:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729769#M835982</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2002-05-23T07:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: AWK again...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729770#M835983</link>
      <description>Robin,&lt;BR /&gt;&lt;BR /&gt;I tried the following which you suggested:&lt;BR /&gt;awk '$1&amp;gt;40000{ print }' filename | sort +0n&lt;BR /&gt;&lt;BR /&gt;Unfortunately, it produced as error:&lt;BR /&gt;Error context is &lt;BR /&gt;   $1 &amp;gt;&amp;gt;&amp;gt;&amp;gt; 40000{print}' &amp;lt;&amp;lt;&amp;lt;&lt;FILENAME&gt;&lt;/FILENAME&gt;awk: Quitting The source is at line 1&lt;BR /&gt;&lt;BR /&gt;I'm not sure if it I did the right way...&lt;BR /&gt;&lt;BR /&gt;Could you clarify?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 23 May 2002 07:17:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729770#M835983</guid>
      <dc:creator>Chern Jian Leaw</dc:creator>
      <dc:date>2002-05-23T07:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: AWK again...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729771#M835984</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;an over sight on my part this should have been&lt;BR /&gt;&lt;BR /&gt;cat file1 | awk '{ if ($1 &amp;gt; 40000) print $1 " " $2 }' | sort +n +0 &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Thu, 23 May 2002 07:33:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729771#M835984</guid>
      <dc:creator>John Carr_2</dc:creator>
      <dc:date>2002-05-23T07:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: AWK again...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729772#M835985</link>
      <description>Hi,&lt;BR /&gt;I think you forgot the blanks inside the { } :&lt;BR /&gt;awk '$1&amp;gt;40000{ print }' file1 | sort +0n&lt;BR /&gt;You also need to replace "filename" by your filename, "file1".&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Tom</description>
      <pubDate>Thu, 23 May 2002 07:33:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729772#M835985</guid>
      <dc:creator>Tom Geudens</dc:creator>
      <dc:date>2002-05-23T07:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: AWK again...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729773#M835986</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Tom's answer is the right one and best one&lt;BR /&gt;&lt;BR /&gt;John.</description>
      <pubDate>Thu, 23 May 2002 07:57:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729773#M835986</guid>
      <dc:creator>John Carr_2</dc:creator>
      <dc:date>2002-05-23T07:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: AWK again...</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729774#M835987</link>
      <description>All,&lt;BR /&gt;thanks very much - solutions were simple yet helpful. &lt;BR /&gt;&lt;BR /&gt;Tom, &lt;BR /&gt;yes, I forgot the space between { print }!!&lt;BR /&gt;&lt;BR /&gt;Thanks all&lt;BR /&gt;</description>
      <pubDate>Thu, 23 May 2002 08:16:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-again/m-p/2729774#M835987</guid>
      <dc:creator>Chern Jian Leaw</dc:creator>
      <dc:date>2002-05-23T08:16:00Z</dc:date>
    </item>
  </channel>
</rss>

