<?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: Any syntax errors in this command? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726653#M64456</link>
    <description>Perfect Rodney, my question is answered...  Just what I was looking for.</description>
    <pubDate>Fri, 17 May 2002 16:48:47 GMT</pubDate>
    <dc:creator>MAD_2</dc:creator>
    <dc:date>2002-05-17T16:48:47Z</dc:date>
    <item>
      <title>Any syntax errors in this command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726644#M64447</link>
      <description>I am writing a script that looks for specific owner files that are so many days old and it skips files I don't want to include in the list for each user.  The syntax goes like this:&lt;BR /&gt;&lt;BR /&gt;find . -type f -user $USER  -mtime +90 | grep -v '^.sh$' | grep -v '^.pl$' | gre&lt;BR /&gt;p -v '^.sql$'  &amp;gt;&amp;gt; $LOGFILE.$USER.log&lt;BR /&gt;&lt;BR /&gt;However, I am not obtaining the expected result, which should exclude all files with the following pattern *.sh* *.pl* and *.sql*.  Why?  Where did I go wrong?  Any hints?&lt;BR /&gt;&lt;BR /&gt;Thanks...</description>
      <pubDate>Fri, 17 May 2002 16:05:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726644#M64447</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2002-05-17T16:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Any syntax errors in this command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726645#M64448</link>
      <description>Mynor,&lt;BR /&gt;&lt;BR /&gt;Use "set -x" before executing the command and verify how it is resolving your pattern matching.&lt;BR /&gt;&lt;BR /&gt;I would think of taking out single quotes and replacing ^ and $ with the wild char *.&lt;BR /&gt;&lt;BR /&gt;-Sri&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 17 May 2002 16:15:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726645#M64448</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2002-05-17T16:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: Any syntax errors in this command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726646#M64449</link>
      <description>Like Sri said that would work for you. You can also be specific about the "." by using ..&lt;BR /&gt;&lt;BR /&gt;grep -v *\.sh*&lt;BR /&gt;&lt;BR /&gt;.. for example</description>
      <pubDate>Fri, 17 May 2002 16:24:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726646#M64449</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-05-17T16:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Any syntax errors in this command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726647#M64450</link>
      <description>I would remove the "^" in the grep's. They are anchoring to the beginning of line, which I don't think you want.&lt;BR /&gt;&lt;BR /&gt;find . -type f -user $USER -mtime +90 | grep -v '.sh$' | grep -v '.pl$' | grep -v '.sql$' &amp;gt;&amp;gt; $LOGFILE.$USER.log &lt;BR /&gt;&lt;BR /&gt;-- Rod Hills&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 17 May 2002 16:25:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726647#M64450</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-05-17T16:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Any syntax errors in this command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726648#M64451</link>
      <description>The pattern specified by Rodney works for instances such as *.sh or *.sql but not for those like *.sh.* or *.sh_*  That's what I was using at first and it skips the *.sh files, which is part of what I want.  However, there are also files with patterns such as *.sh.YYYYMMDD or *.sh_YYYYMMDD and I want those excluded from the search too.</description>
      <pubDate>Fri, 17 May 2002 16:30:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726648#M64451</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2002-05-17T16:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Any syntax errors in this command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726649#M64452</link>
      <description>Hi Mynor,&lt;BR /&gt;&lt;BR /&gt;Try this,&lt;BR /&gt;&lt;BR /&gt;find . -type f -user $USER -mtime +90 | grep -v '\.sh$' | grep -v '\.pl$' | grep -v '\.sql$' &amp;gt;&amp;gt; $LOGFILE.$USER.log&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;regds&lt;BR /&gt;</description>
      <pubDate>Fri, 17 May 2002 16:35:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726649#M64452</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2002-05-17T16:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Any syntax errors in this command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726650#M64453</link>
      <description>Try this as the grep (only one is required):&lt;BR /&gt;&lt;BR /&gt;grep -v -e \.sh -e \.pl -e \.sql&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;John</description>
      <pubDate>Fri, 17 May 2002 16:36:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726650#M64453</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2002-05-17T16:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Any syntax errors in this command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726651#M64454</link>
      <description>If you use extended regular expressions (available with -E option on grep), you can be more detailed on what to choose-&lt;BR /&gt;&lt;BR /&gt;find ... | grep -v -E "\.[sql|pl|sh]([._][0-9]*)*" &amp;gt;logfile&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Fri, 17 May 2002 16:40:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726651#M64454</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-05-17T16:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Any syntax errors in this command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726652#M64455</link>
      <description>Oops, forgot dollar sign on end&lt;BR /&gt;&lt;BR /&gt;find ... | grep -v -E "\.[sql|pl|sh]([._][0-9]*)*$" &amp;gt;logfile &lt;BR /&gt;&lt;BR /&gt;-- Rod Hills&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 17 May 2002 16:42:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726652#M64455</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-05-17T16:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Any syntax errors in this command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726653#M64456</link>
      <description>Perfect Rodney, my question is answered...  Just what I was looking for.</description>
      <pubDate>Fri, 17 May 2002 16:48:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726653#M64456</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2002-05-17T16:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Any syntax errors in this command?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726654#M64457</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Your original expression meant to match the patterns as achored at both the beginning and the ending of a line -- i.e. strings that constitute the whole line.  Returning filenames from the current directory would yield strings beginning with "./" too.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 17 May 2002 16:54:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/any-syntax-errors-in-this-command/m-p/2726654#M64457</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-05-17T16:54:24Z</dc:date>
    </item>
  </channel>
</rss>

