<?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: grepping a specific column ??? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532983#M728722</link>
    <description>Try this:&lt;BR /&gt;&lt;BR /&gt;cut -c5-10 filename1 | grep findthis&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 25 May 2001 15:19:28 GMT</pubDate>
    <dc:creator>John Poff</dc:creator>
    <dc:date>2001-05-25T15:19:28Z</dc:date>
    <item>
      <title>grepping a specific column ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532982#M728721</link>
      <description>&lt;BR /&gt;Can anyone advise on a command or script which will read through a large file line by line extracting lines which contain a specific strings of characters which appear between certain places on a line.&lt;BR /&gt;&lt;BR /&gt;e.g grep abcde filename1 &amp;gt; filename2 works, but I only want not look in characters 5-10 of each line and no where else on the line.&lt;BR /&gt;&lt;BR /&gt;Many thanks&lt;BR /&gt;</description>
      <pubDate>Fri, 25 May 2001 15:16:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532982#M728721</guid>
      <dc:creator>HP System Handle Owner</dc:creator>
      <dc:date>2001-05-25T15:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: grepping a specific column ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532983#M728722</link>
      <description>Try this:&lt;BR /&gt;&lt;BR /&gt;cut -c5-10 filename1 | grep findthis&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 25 May 2001 15:19:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532983#M728722</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2001-05-25T15:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: grepping a specific column ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532984#M728723</link>
      <description>you need to use awk for this, if I understand you question correctly.&lt;BR /&gt;columns start at $0, $1, $2&lt;BR /&gt;so to print the second column&lt;BR /&gt;awk '{print $1}'&lt;BR /&gt;whitespace is the default deliminator, to change this use -F &lt;DELIM&gt;.&lt;/DELIM&gt;</description>
      <pubDate>Fri, 25 May 2001 15:21:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532984#M728723</guid>
      <dc:creator>Kevin Wright</dc:creator>
      <dc:date>2001-05-25T15:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: grepping a specific column ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532985#M728724</link>
      <description>awk '{ print $5,$10 }'filename1|grep file_find</description>
      <pubDate>Fri, 25 May 2001 15:22:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532985#M728724</guid>
      <dc:creator>Vincenzo Restuccia</dc:creator>
      <dc:date>2001-05-25T15:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: grepping a specific column ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532986#M728725</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;try this&lt;BR /&gt;cat filename | awk '{ print $5 } | cut -c5-10&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
      <pubDate>Fri, 25 May 2001 15:33:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532986#M728725</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2001-05-25T15:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: grepping a specific column ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532987#M728726</link>
      <description>How about&lt;BR /&gt;&lt;BR /&gt; awk 'substr($0,5,5)="datum"{print $0}' your_file&lt;BR /&gt;&lt;BR /&gt;awk can compare a substring and then print only thos lines&lt;BR /&gt;  or&lt;BR /&gt;&lt;BR /&gt; perl -nie 'print if substr($_,4,5) eq "datum"'&lt;BR /&gt;&lt;BR /&gt;perl can also compare a substring and then print</description>
      <pubDate>Fri, 25 May 2001 15:35:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532987#M728726</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2001-05-25T15:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: grepping a specific column ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532988#M728727</link>
      <description>&lt;BR /&gt;awk ' $2 == "data" { print $0 }' file.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 25 May 2001 16:13:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532988#M728727</guid>
      <dc:creator>Carlos Fernandez Riera</dc:creator>
      <dc:date>2001-05-25T16:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: grepping a specific column ???</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532989#M728728</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Try using a regular expression:&lt;BR /&gt;&lt;BR /&gt;grep ".....abcde" file1 &amp;gt; file2&lt;BR /&gt;&lt;BR /&gt;The . wil match any single character.  You could probably get away with the following, which would guard against the wrong number of "dots":&lt;BR /&gt;&lt;BR /&gt;grep ".\{5\}abcdef" file1 &amp;gt; file2&lt;BR /&gt;&lt;BR /&gt;See the regexp(5) and the grep(1) man pages for more information.&lt;BR /&gt;&lt;BR /&gt;--Bruce</description>
      <pubDate>Sat, 26 May 2001 01:42:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grepping-a-specific-column/m-p/2532989#M728728</guid>
      <dc:creator>Bruce Regittko_1</dc:creator>
      <dc:date>2001-05-26T01:42:47Z</dc:date>
    </item>
  </channel>
</rss>

