<?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: counting number of rows in awk in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/counting-number-of-rows-in-awk/m-p/5070770#M94909</link>
    <description>Hi Chris:&lt;BR /&gt;&lt;BR /&gt;# awk 'END{print i};{len=length($0);if (len &amp;gt; 42) {i++}}'&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Tue, 25 Sep 2007 09:02:56 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2007-09-25T09:02:56Z</dc:date>
    <item>
      <title>counting number of rows in awk</title>
      <link>https://community.hpe.com/t5/operating-system-linux/counting-number-of-rows-in-awk/m-p/5070768#M94907</link>
      <description>hello all,&lt;BR /&gt;&lt;BR /&gt;I am now attempting to add up the number of rows in the file that have more than 42 characters and output the total number of rows:&lt;BR /&gt;&lt;BR /&gt;nawk '{len = length($0); if (len &amp;gt; 42) ??&lt;BR /&gt;&lt;BR /&gt;I have attempted some syntax that I use to count total rows in the file however how can I just count the rows &amp;gt; 42?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Chris.&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Sep 2007 08:52:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/counting-number-of-rows-in-awk/m-p/5070768#M94907</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2007-09-25T08:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: counting number of rows in awk</title>
      <link>https://community.hpe.com/t5/operating-system-linux/counting-number-of-rows-in-awk/m-p/5070769#M94908</link>
      <description># nawk '{if(length($0)&amp;gt;42) cnt++}END{print cnt}' file</description>
      <pubDate>Tue, 25 Sep 2007 08:57:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/counting-number-of-rows-in-awk/m-p/5070769#M94908</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-09-25T08:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: counting number of rows in awk</title>
      <link>https://community.hpe.com/t5/operating-system-linux/counting-number-of-rows-in-awk/m-p/5070770#M94909</link>
      <description>Hi Chris:&lt;BR /&gt;&lt;BR /&gt;# awk 'END{print i};{len=length($0);if (len &amp;gt; 42) {i++}}'&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 25 Sep 2007 09:02:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/counting-number-of-rows-in-awk/m-p/5070770#M94909</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-09-25T09:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: counting number of rows in awk</title>
      <link>https://community.hpe.com/t5/operating-system-linux/counting-number-of-rows-in-awk/m-p/5070771#M94910</link>
      <description>Hey&lt;BR /&gt;&lt;BR /&gt;use sed:&lt;BR /&gt;sed -n '/^.\{43\}/p' file1 | wc -l&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Tue, 25 Sep 2007 09:03:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/counting-number-of-rows-in-awk/m-p/5070771#M94910</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2007-09-25T09:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: counting number of rows in awk</title>
      <link>https://community.hpe.com/t5/operating-system-linux/counting-number-of-rows-in-awk/m-p/5070772#M94911</link>
      <description>Hi (again) Chris:&lt;BR /&gt;&lt;BR /&gt;You can even write this more tersely, thusly:&lt;BR /&gt;&lt;BR /&gt;# awk 'length&amp;gt;42 {i++};END{print i}' file&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 25 Sep 2007 09:23:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/counting-number-of-rows-in-awk/m-p/5070772#M94911</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-09-25T09:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: counting number of rows in awk</title>
      <link>https://community.hpe.com/t5/operating-system-linux/counting-number-of-rows-in-awk/m-p/5070773#M94912</link>
      <description>nice one &lt;BR /&gt;&lt;BR /&gt;thanks again all!</description>
      <pubDate>Tue, 25 Sep 2007 09:25:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/counting-number-of-rows-in-awk/m-p/5070773#M94912</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2007-09-25T09:25:45Z</dc:date>
    </item>
  </channel>
</rss>

