<?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: extracting records from a data file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628866#M920482</link>
    <description>and with awk&lt;BR /&gt;&lt;BR /&gt;awk '/^......X/ {print $0 &amp;gt;&amp;gt; "linesWithX";next} {print $0 &amp;gt;&amp;gt; "linesWithoutX";}'&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 10 Dec 2001 21:17:38 GMT</pubDate>
    <dc:creator>Curtis Larson_1</dc:creator>
    <dc:date>2001-12-10T21:17:38Z</dc:date>
    <item>
      <title>extracting records from a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628858#M920474</link>
      <description>I'm trying to pull a number of records that contain 'X' as the seventh character of the string.  I've tried using wild cards (??????X) in a grep statement, as well as [A-Z]....X, but am looking for a simpler, more direct way that I can use in the future as well.&lt;BR /&gt;&lt;BR /&gt;Along with that, I'm curious if there would be a way to direct records that don't have 'X' in them to another file...if the 2 files record count adds up to the original, I'm in like Flynn.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Joe Robinson</description>
      <pubDate>Mon, 10 Dec 2001 20:33:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628858#M920474</guid>
      <dc:creator>Joe Robinson_2</dc:creator>
      <dc:date>2001-12-10T20:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: extracting records from a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628859#M920475</link>
      <description>You already have the best way to extract them grep ??????X&lt;BR /&gt;&lt;BR /&gt;to get the opposite, all you have to do is grep -v ??????X</description>
      <pubDate>Mon, 10 Dec 2001 20:35:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628859#M920475</guid>
      <dc:creator>Jeff Machols</dc:creator>
      <dc:date>2001-12-10T20:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: extracting records from a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628860#M920476</link>
      <description>Not sure why that syntax won't work here...that was the first two things I thought of.</description>
      <pubDate>Mon, 10 Dec 2001 20:42:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628860#M920476</guid>
      <dc:creator>Joe Robinson_2</dc:creator>
      <dc:date>2001-12-10T20:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: extracting records from a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628861#M920477</link>
      <description>could always try&lt;BR /&gt;&lt;BR /&gt;sed '/[.]\{6\}X/p'&lt;BR /&gt;&lt;BR /&gt;and those without a X at the 7th character:&lt;BR /&gt;&lt;BR /&gt;sed '/[.]\{6\}X/d'&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Dec 2001 20:44:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628861#M920477</guid>
      <dc:creator>Curtis Larson_1</dc:creator>
      <dc:date>2001-12-10T20:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: extracting records from a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628862#M920478</link>
      <description>you may need to anchor the grep by doing this &lt;BR /&gt;&lt;BR /&gt;grep "^??????X" file&lt;BR /&gt;grep -v "^??????X" file&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Dec 2001 20:45:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628862#M920478</guid>
      <dc:creator>Jeff Machols</dc:creator>
      <dc:date>2001-12-10T20:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: extracting records from a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628863#M920479</link>
      <description>This will work also&lt;BR /&gt;&lt;BR /&gt;cat file | cut -c 7 | grep X&lt;BR /&gt;cat file | cut -c 7 | grep -v X</description>
      <pubDate>Mon, 10 Dec 2001 20:52:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628863#M920479</guid>
      <dc:creator>Jeff Machols</dc:creator>
      <dc:date>2001-12-10T20:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: extracting records from a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628864#M920480</link>
      <description>and with grep&lt;BR /&gt;&lt;BR /&gt;grep '.\{6\}X'</description>
      <pubDate>Mon, 10 Dec 2001 20:52:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628864#M920480</guid>
      <dc:creator>Curtis Larson_1</dc:creator>
      <dc:date>2001-12-10T20:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: extracting records from a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628865#M920481</link>
      <description>One thing you will want to add to Curtis' is &lt;BR /&gt;&lt;BR /&gt;grep '^.\{6\}X' file&lt;BR /&gt;&lt;BR /&gt;otherwise you will get it if X is the 8th, 9th, etc&lt;BR /&gt;&lt;BR /&gt;the ^ will anchor it to the begining of the line</description>
      <pubDate>Mon, 10 Dec 2001 21:02:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628865#M920481</guid>
      <dc:creator>Jeff Machols</dc:creator>
      <dc:date>2001-12-10T21:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: extracting records from a data file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628866#M920482</link>
      <description>and with awk&lt;BR /&gt;&lt;BR /&gt;awk '/^......X/ {print $0 &amp;gt;&amp;gt; "linesWithX";next} {print $0 &amp;gt;&amp;gt; "linesWithoutX";}'&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Dec 2001 21:17:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/extracting-records-from-a-data-file/m-p/2628866#M920482</guid>
      <dc:creator>Curtis Larson_1</dc:creator>
      <dc:date>2001-12-10T21:17:38Z</dc:date>
    </item>
  </channel>
</rss>

