<?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 statement in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032757#M48331</link>
    <description>Thanks Court for an interesting reply!!! I would prefer if you would once again read my question carefully.&lt;BR /&gt;Thanks Stuart for the generous reply, I will definitely check out and learn.</description>
    <pubDate>Fri, 09 Mar 2007 01:00:30 GMT</pubDate>
    <dc:creator>Sandeepk_1</dc:creator>
    <dc:date>2007-03-09T01:00:30Z</dc:date>
    <item>
      <title>awk statement</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032754#M48328</link>
      <description>can anyone validate this syntax and let know whether the output will be a desired one?&lt;BR /&gt;cat $filename | grep $UNO| awk -v reg=$region -v cir=$circle -v uno=$UNO '$18 &amp;gt; 90 &amp;amp;&amp;amp; $3==uno {print reg"\t"cir" \t "$3" \t " $4"-"$5"-"$6" \t "$18 "\t"}'</description>
      <pubDate>Thu, 08 Mar 2007 07:48:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032754#M48328</guid>
      <dc:creator>Sandeepk_1</dc:creator>
      <dc:date>2007-03-08T07:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: awk statement</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032755#M48329</link>
      <description>This makes no sense. We should not be the ones determining the desired output. Plus we do not know what is in the file that is being cat'ed, nor what the value of $UNO is, etc. How could we possibly answer this?</description>
      <pubDate>Thu, 08 Mar 2007 08:19:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032755#M48329</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2007-03-08T08:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: awk statement</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032756#M48330</link>
      <description>in any case, learn how to use a printf() statement.</description>
      <pubDate>Thu, 08 Mar 2007 17:28:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032756#M48330</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2007-03-08T17:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: awk statement</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032757#M48331</link>
      <description>Thanks Court for an interesting reply!!! I would prefer if you would once again read my question carefully.&lt;BR /&gt;Thanks Stuart for the generous reply, I will definitely check out and learn.</description>
      <pubDate>Fri, 09 Mar 2007 01:00:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032757#M48331</guid>
      <dc:creator>Sandeepk_1</dc:creator>
      <dc:date>2007-03-09T01:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: awk statement</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032758#M48332</link>
      <description>&lt;BR /&gt;Sandeep,&lt;BR /&gt;&lt;BR /&gt;Please re-read your own question carefully and now judge how anyone can possibly answer it?!&lt;BR /&gt;&lt;BR /&gt;How can anyone know what 'desired' output is without specifying some details on both input and output format.&lt;BR /&gt;&lt;BR /&gt;The suggested command might do something useful is the file pointed to by $filename is a file with white-space seperated columns where some lines contain $UNO in some 3rd columns. Some of those lines would need to  have 18 or more columns and the value in column 18 should be larger than 90 for more that 1 of those.&lt;BR /&gt;&lt;BR /&gt;But here is some free advide anyway!&lt;BR /&gt;Get rid of the 'cat' and the 'grep'!&lt;BR /&gt;Just let awk do the work!&lt;BR /&gt;&lt;BR /&gt;awk -v... '$3==uno $18&amp;gt;90 {...}' $filename&lt;BR /&gt;&lt;BR /&gt;Finally... have you simply tried it?&lt;BR /&gt;Just make a mock-up file with some valid lines and some bad lines.&lt;BR /&gt;&lt;BR /&gt;Kindest regards,&lt;BR /&gt;Hein van den Heuvel.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 10 Mar 2007 18:08:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032758#M48332</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-03-10T18:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: awk statement</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032759#M48333</link>
      <description>Oh, btw, you seem to want to make a Tab-Seperated-Values output file (easy for Excel).&lt;BR /&gt;The easiest way to do that in awk is to set the Output Field Seperator (OFS) to tab.&lt;BR /&gt;&lt;BR /&gt;awk -v... 'BEGIN {OFS="\t"} $3==uno... {print reg,cir,$3,...}'&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 10 Mar 2007 23:01:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032759#M48333</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-03-10T23:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: awk statement</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032760#M48334</link>
      <description>Thanks alot everyone for your support. got the exact syntax done.</description>
      <pubDate>Mon, 12 Mar 2007 04:29:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032760#M48334</guid>
      <dc:creator>Sandeepk_1</dc:creator>
      <dc:date>2007-03-12T04:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: awk statement</title>
      <link>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032761#M48335</link>
      <description>thanks once again</description>
      <pubDate>Mon, 12 Mar 2007 04:31:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/awk-statement/m-p/5032761#M48335</guid>
      <dc:creator>Sandeepk_1</dc:creator>
      <dc:date>2007-03-12T04:31:09Z</dc:date>
    </item>
  </channel>
</rss>

