<?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 grep command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790687#M79574</link>
    <description>HI,&lt;BR /&gt;&lt;BR /&gt;Is there a way exclude several patterns all at once from a file? &lt;BR /&gt;&lt;BR /&gt;I have the a file of the form:&lt;BR /&gt;#cat fileA&lt;BR /&gt;FILE   OWNER   SIZE&lt;BR /&gt;--------------------&lt;BR /&gt;f1      ken     17&lt;BR /&gt;f2      john    17&lt;BR /&gt;f3      peter   17&lt;BR /&gt;&lt;BR /&gt;I would like to ignore lines beginning with FILE and with the pattern "------", simultaneously &lt;BR /&gt;&lt;BR /&gt;I tried the followiu:&lt;BR /&gt;#grep  -v "FILE" "--" fileA &amp;gt; temp&lt;BR /&gt;grep: 0652-033 Cannot open --.&lt;BR /&gt;&lt;BR /&gt;#grep -vv  "FILE" "--" fileA &amp;gt; temp&lt;BR /&gt;grep: 0652-033 Cannot open --.&lt;BR /&gt;&lt;BR /&gt;#grep -v "FILE" -v "--" fileA &amp;gt; temp&lt;BR /&gt;grep: 0652-033 Cannot open --.&lt;BR /&gt;&lt;BR /&gt;could someone show me how I could exclude several patterns from different lines in a file, simultenously i.e in 1 command?&lt;BR /&gt;&lt;BR /&gt;Thanks. &lt;BR /&gt;</description>
    <pubDate>Wed, 21 Aug 2002 09:47:02 GMT</pubDate>
    <dc:creator>Chern Jian Leaw</dc:creator>
    <dc:date>2002-08-21T09:47:02Z</dc:date>
    <item>
      <title>grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790687#M79574</link>
      <description>HI,&lt;BR /&gt;&lt;BR /&gt;Is there a way exclude several patterns all at once from a file? &lt;BR /&gt;&lt;BR /&gt;I have the a file of the form:&lt;BR /&gt;#cat fileA&lt;BR /&gt;FILE   OWNER   SIZE&lt;BR /&gt;--------------------&lt;BR /&gt;f1      ken     17&lt;BR /&gt;f2      john    17&lt;BR /&gt;f3      peter   17&lt;BR /&gt;&lt;BR /&gt;I would like to ignore lines beginning with FILE and with the pattern "------", simultaneously &lt;BR /&gt;&lt;BR /&gt;I tried the followiu:&lt;BR /&gt;#grep  -v "FILE" "--" fileA &amp;gt; temp&lt;BR /&gt;grep: 0652-033 Cannot open --.&lt;BR /&gt;&lt;BR /&gt;#grep -vv  "FILE" "--" fileA &amp;gt; temp&lt;BR /&gt;grep: 0652-033 Cannot open --.&lt;BR /&gt;&lt;BR /&gt;#grep -v "FILE" -v "--" fileA &amp;gt; temp&lt;BR /&gt;grep: 0652-033 Cannot open --.&lt;BR /&gt;&lt;BR /&gt;could someone show me how I could exclude several patterns from different lines in a file, simultenously i.e in 1 command?&lt;BR /&gt;&lt;BR /&gt;Thanks. &lt;BR /&gt;</description>
      <pubDate>Wed, 21 Aug 2002 09:47:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790687#M79574</guid>
      <dc:creator>Chern Jian Leaw</dc:creator>
      <dc:date>2002-08-21T09:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790688#M79575</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;&lt;BR /&gt;grep -v -e "FILE" -e "--" fileA &amp;gt; temp &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Aug 2002 09:49:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790688#M79575</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-08-21T09:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790689#M79576</link>
      <description>grep -Ev "FILE|---" your_file</description>
      <pubDate>Wed, 21 Aug 2002 09:50:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790689#M79576</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2002-08-21T09:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790690#M79577</link>
      <description>grep -v -e '^FILE' -e '^----' fileA &amp;gt;temp&lt;BR /&gt;&lt;BR /&gt;Instead of multiple "-e" options, you can also put the patterns in a file and use that file  "-f pattern_file".</description>
      <pubDate>Wed, 21 Aug 2002 09:51:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790690#M79577</guid>
      <dc:creator>Frank Slootweg</dc:creator>
      <dc:date>2002-08-21T09:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790691#M79578</link>
      <description>Hi,&lt;BR /&gt;You need to use the following:&lt;BR /&gt;   grep -v -e '&lt;PATTERN1&gt;' -e '&lt;PATTERN2&gt;' &lt;FILE&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Ollie.&lt;/FILE&gt;&lt;/PATTERN2&gt;&lt;/PATTERN1&gt;</description>
      <pubDate>Wed, 21 Aug 2002 09:51:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790691#M79578</guid>
      <dc:creator>Ollie R</dc:creator>
      <dc:date>2002-08-21T09:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790692#M79579</link>
      <description>Four responses in two minutes, not bad! :-)&lt;BR /&gt;&lt;BR /&gt;[No points for this one please.]</description>
      <pubDate>Wed, 21 Aug 2002 09:52:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790692#M79579</guid>
      <dc:creator>Frank Slootweg</dc:creator>
      <dc:date>2002-08-21T09:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790693#M79580</link>
      <description>No points??? Meany!    8Ob</description>
      <pubDate>Wed, 21 Aug 2002 09:54:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790693#M79580</guid>
      <dc:creator>Ollie R</dc:creator>
      <dc:date>2002-08-21T09:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790694#M79581</link>
      <description>I meant no points for the response in which I said that, i.e. my 10:52 AM one.&lt;BR /&gt;&lt;BR /&gt;Of course the other responses, including mine :-), deserve points.&lt;BR /&gt;&lt;BR /&gt;[No points for *T*H*I*S* response please! :-)]</description>
      <pubDate>Wed, 21 Aug 2002 09:58:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790694#M79581</guid>
      <dc:creator>Frank Slootweg</dc:creator>
      <dc:date>2002-08-21T09:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790695#M79582</link>
      <description>...or even:&lt;BR /&gt;&lt;BR /&gt;Create a file containing your ignore strings, e.g.&lt;BR /&gt;&lt;BR /&gt;fileA.ignore contains:&lt;BR /&gt;FILE&lt;BR /&gt;----&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;then:&lt;BR /&gt;&lt;BR /&gt;grep -v -f fileA.ignore fileA&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin.</description>
      <pubDate>Wed, 21 Aug 2002 10:06:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790695#M79582</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2002-08-21T10:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790696#M79583</link>
      <description>robin,&lt;BR /&gt;&lt;BR /&gt;I tried what you've suggested. But the pattern is fileA is still not ignored.&lt;BR /&gt;&lt;BR /&gt;#cat pattern&lt;BR /&gt;FILE&lt;BR /&gt;------&lt;BR /&gt;&lt;BR /&gt;#grep -v pattern fileA &amp;gt; temp&lt;BR /&gt;&lt;BR /&gt;The file temp still contains patterns beginning with FILE and ---&lt;BR /&gt;&lt;BR /&gt;Could you show me how I could have such patterns included into the file?&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Wed, 21 Aug 2002 10:23:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790696#M79583</guid>
      <dc:creator>Chern Jian Leaw</dc:creator>
      <dc:date>2002-08-21T10:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790697#M79584</link>
      <description>Robin's answer should work - I think you left out the "-f" that should have appeared before "pattern".&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 21 Aug 2002 11:32:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790697#M79584</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-08-21T11:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790698#M79585</link>
      <description>Or you could simply use:&lt;BR /&gt;&lt;BR /&gt; egrep -v 'FILE|---' fileA&lt;BR /&gt;&lt;BR /&gt;good luck</description>
      <pubDate>Thu, 22 Aug 2002 15:49:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/grep-command/m-p/2790698#M79585</guid>
      <dc:creator>John Dvorchak</dc:creator>
      <dc:date>2002-08-22T15:49:51Z</dc:date>
    </item>
  </channel>
</rss>

