<?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: grep -A option - Illegal option issue in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/grep-a-option-illegal-option-issue/m-p/4972699#M47044</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;the URL and -A option is for gnu grep, which you have to download and install first. You can probably find a suitable version of that at Merijn's site: &lt;BR /&gt;&lt;A href="http://www.hpux.ws/merijn/" target="_blank"&gt;http://www.hpux.ws/merijn/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
    <pubDate>Sun, 09 Apr 2006 02:37:27 GMT</pubDate>
    <dc:creator>john korterman</dc:creator>
    <dc:date>2006-04-09T02:37:27Z</dc:date>
    <item>
      <title>grep -A option - Illegal option issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/grep-a-option-illegal-option-issue/m-p/4972698#M47043</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I'm attempting to use the grep -A option i.e. to print the number of lines of trailing context after the matching lines. &lt;BR /&gt;&lt;BR /&gt;I'm wanting to extract the values between the tags in a XML file. I've attempted the method below:&lt;BR /&gt;prod-cingtuna\ :/mkl/users/lows &amp;gt;grep -A1 -E '(&amp;gt;URLString&amp;lt;|&amp;gt;title&amp;lt;)' sample.xml&lt;BR /&gt;grep: illegal option -- A&lt;BR /&gt;Usage:  grep [-c|-l|-q] [-bhinsvwx] pattern_list [file ...]&lt;BR /&gt;        grep [-c|-l|-q] [-bhinsvwx] [-e pattern_list]... [-f pattern_file]... [file...]&lt;BR /&gt;        grep -E [-c|-l|-q] [-bhinsvx] pattern_list [file ...]&lt;BR /&gt;        grep -E [-c|-l|-q] [-bhinsvx] [-e pattern_list]... [-f pattern_file]... [file...]&lt;BR /&gt;        grep -F [-c|-l|-q] [-bhinsvx] pattern_list [file ...]&lt;BR /&gt;        grep -F [-c|-l|-q] [-bhinsvx] [-e pattern_list]... [-f pattern_file]... [file...]&lt;BR /&gt;prod-cingtuna\ :/mkl/users/lows &amp;gt;which grep&lt;BR /&gt;/usr/xpg4/bin/grep&lt;BR /&gt;&lt;BR /&gt;prod-cingtuna\ :/mkl/users/lows&amp;gt;&lt;BR /&gt;/usr/bin/grep -A1 -E '(&amp;gt;URLString&amp;lt;|&amp;gt;title&amp;lt;)' sample.xml&lt;BR /&gt;/usr/bin/grep: illegal option -- A&lt;BR /&gt;/usr/bin/grep: illegal option -- 1&lt;BR /&gt;/usr/bin/grep: illegal option -- E&lt;BR /&gt;Usage: grep -hblcnsviw pattern file . . .&lt;BR /&gt;&lt;BR /&gt;However, as shown above, the grep utility didn't seem to recognize the -A option. I've used grep utilities from /usr/bin/grep and /usr/xpg4/bin/grep. &lt;BR /&gt;&lt;BR /&gt;I've checked the URL &lt;A href="http://unixhelp.ed.ac.uk/CGI/man-cgi?grep" target="_blank"&gt;http://unixhelp.ed.ac.uk/CGI/man-cgi?grep&lt;/A&gt; &lt;BR /&gt;for the grep options and -A is a valid option. &lt;BR /&gt;&lt;BR /&gt;Attached is the XML file which I'm attempting to "grep" values between the specific tag.&lt;BR /&gt;&lt;BR /&gt;May I know which grep version or location of grep would have the -A option? &lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;</description>
      <pubDate>Sun, 09 Apr 2006 02:14:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/grep-a-option-illegal-option-issue/m-p/4972698#M47043</guid>
      <dc:creator>Danny Fang</dc:creator>
      <dc:date>2006-04-09T02:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: grep -A option - Illegal option issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/grep-a-option-illegal-option-issue/m-p/4972699#M47044</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;the URL and -A option is for gnu grep, which you have to download and install first. You can probably find a suitable version of that at Merijn's site: &lt;BR /&gt;&lt;A href="http://www.hpux.ws/merijn/" target="_blank"&gt;http://www.hpux.ws/merijn/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Sun, 09 Apr 2006 02:37:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/grep-a-option-illegal-option-issue/m-p/4972699#M47044</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2006-04-09T02:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: grep -A option - Illegal option issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/grep-a-option-illegal-option-issue/m-p/4972700#M47045</link>
      <description>Shalom Danny,&lt;BR /&gt;&lt;BR /&gt;-A is not a valid option for the standard hp-ux grep.&lt;BR /&gt;&lt;BR /&gt;I have checked egrep and it is also not valid.&lt;BR /&gt;&lt;BR /&gt;You may wish to see &lt;A href="http://www.gnu.org" target="_blank"&gt;http://www.gnu.org&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;They may have a grep that runs on HP-UX that meets your need.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Sun, 09 Apr 2006 02:38:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/grep-a-option-illegal-option-issue/m-p/4972700#M47045</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-04-09T02:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: grep -A option - Illegal option issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/grep-a-option-illegal-option-issue/m-p/4972701#M47046</link>
      <description>Hi everyone,&lt;BR /&gt;&lt;BR /&gt;I've tested the grep -A option on a Linux machine and it did not produce the error "illegal option".&lt;BR /&gt;&lt;BR /&gt;Thanks very much for the advice.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 09 Apr 2006 04:15:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/grep-a-option-illegal-option-issue/m-p/4972701#M47046</guid>
      <dc:creator>Danny Fang</dc:creator>
      <dc:date>2006-04-09T04:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: grep -A option - Illegal option issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/grep-a-option-illegal-option-issue/m-p/4972702#M47047</link>
      <description>Issue solved.</description>
      <pubDate>Sun, 09 Apr 2006 04:16:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/grep-a-option-illegal-option-issue/m-p/4972702#M47047</guid>
      <dc:creator>Danny Fang</dc:creator>
      <dc:date>2006-04-09T04:16:32Z</dc:date>
    </item>
  </channel>
</rss>

