<?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: Using regular expr. in a grep command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/using-regular-expr-in-a-grep-command/m-p/2809641#M83923</link>
    <description>Hi Ron,&lt;BR /&gt;&lt;BR /&gt; I don't think "L" is a valid grep parm.&lt;BR /&gt;And the "l" will only return filenames with that pattern within the file itself. If you want to find filenames then I'd use find &amp;amp; pipe it to grep&lt;BR /&gt;&lt;BR /&gt;find . -name -exec grep 'LTA[0-9]'&lt;BR /&gt;&lt;BR /&gt;for all numbers. And use this format for whatever numbers you wish&lt;BR /&gt;&lt;BR /&gt;find . -name -exec grep 'LTA[24680]'&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
    <pubDate>Thu, 19 Sep 2002 13:25:28 GMT</pubDate>
    <dc:creator>Jeff Schussele</dc:creator>
    <dc:date>2002-09-19T13:25:28Z</dc:date>
    <item>
      <title>Using regular expr. in a grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-regular-expr-in-a-grep-command/m-p/2809640#M83922</link>
      <description>Hi out there,&lt;BR /&gt;&lt;BR /&gt;I want to grep files with a certain prefix and with any combination and digits of numbers.&lt;BR /&gt;&lt;BR /&gt;# grep -L LTA'[0-9]' *&lt;BR /&gt;&lt;BR /&gt;will return only on number. But what if I want to represent any number of numbers? My fantasy dosen't help either.&lt;BR /&gt;&lt;BR /&gt;Ron</description>
      <pubDate>Thu, 19 Sep 2002 13:13:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-regular-expr-in-a-grep-command/m-p/2809640#M83922</guid>
      <dc:creator>Ronald Cogen</dc:creator>
      <dc:date>2002-09-19T13:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using regular expr. in a grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-regular-expr-in-a-grep-command/m-p/2809641#M83923</link>
      <description>Hi Ron,&lt;BR /&gt;&lt;BR /&gt; I don't think "L" is a valid grep parm.&lt;BR /&gt;And the "l" will only return filenames with that pattern within the file itself. If you want to find filenames then I'd use find &amp;amp; pipe it to grep&lt;BR /&gt;&lt;BR /&gt;find . -name -exec grep 'LTA[0-9]'&lt;BR /&gt;&lt;BR /&gt;for all numbers. And use this format for whatever numbers you wish&lt;BR /&gt;&lt;BR /&gt;find . -name -exec grep 'LTA[24680]'&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
      <pubDate>Thu, 19 Sep 2002 13:25:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-regular-expr-in-a-grep-command/m-p/2809641#M83923</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2002-09-19T13:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using regular expr. in a grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-regular-expr-in-a-grep-command/m-p/2809642#M83924</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Have you tried a grep/egrep on a grep&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ls -l | grep LTA | egrep " [1-9]"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Thu, 19 Sep 2002 13:25:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-regular-expr-in-a-grep-command/m-p/2809642#M83924</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-09-19T13:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using regular expr. in a grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-regular-expr-in-a-grep-command/m-p/2809643#M83925</link>
      <description>If I read your question right, you want to find LTA followed by any number of digits.&lt;BR /&gt;&lt;BR /&gt;A typical regexp for grep would be&lt;BR /&gt;grep -L LTA'[0-9][0-9]*' *&lt;BR /&gt;&lt;BR /&gt;This would look for LTA followed by a digit, followed by zero or more additional digits.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Thu, 19 Sep 2002 13:27:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-regular-expr-in-a-grep-command/m-p/2809643#M83925</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-09-19T13:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using regular expr. in a grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-regular-expr-in-a-grep-command/m-p/2809644#M83926</link>
      <description>Hi Ron,&lt;BR /&gt;&lt;BR /&gt;Not sure I understand the question:&lt;BR /&gt;&lt;BR /&gt;grep -lE LTA[0-9]+ *&lt;BR /&gt;&lt;BR /&gt;will list all files containing LTA plus at least one number.&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin</description>
      <pubDate>Thu, 19 Sep 2002 13:31:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-regular-expr-in-a-grep-command/m-p/2809644#M83926</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2002-09-19T13:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using regular expr. in a grep command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-regular-expr-in-a-grep-command/m-p/2809645#M83927</link>
      <description>Hi Ron,&lt;BR /&gt;&lt;BR /&gt;If you are searching for that pattern within a file you could also use a character class expression:&lt;BR /&gt;&lt;BR /&gt;grep -l LTA"[[:digit:]]" *&lt;BR /&gt;&lt;BR /&gt;This would find the LTA followed by any number of digits.&lt;BR /&gt;&lt;BR /&gt;See man 5 regexp for more on character classes.&lt;BR /&gt;&lt;BR /&gt;Have fun!  :-)&lt;BR /&gt;Larry</description>
      <pubDate>Thu, 19 Sep 2002 13:45:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-regular-expr-in-a-grep-command/m-p/2809645#M83927</guid>
      <dc:creator>Larry Reinhart</dc:creator>
      <dc:date>2002-09-19T13:45:00Z</dc:date>
    </item>
  </channel>
</rss>

