<?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 but not grep in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006846#M96217</link>
    <description>Since you want only the .cpp files try the one below:&lt;BR /&gt;&lt;BR /&gt;# ls -1 | grep ".cpp$"</description>
    <pubDate>Thu, 24 May 2007 15:07:47 GMT</pubDate>
    <dc:creator>Sandman!</dc:creator>
    <dc:date>2007-05-24T15:07:47Z</dc:date>
    <item>
      <title>grep but not grep</title>
      <link>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006845#M96216</link>
      <description>Gurus&lt;BR /&gt;&lt;BR /&gt;I have the following files&lt;BR /&gt;&lt;BR /&gt;a.cpp&lt;BR /&gt;b.cpp&lt;BR /&gt;b.h&lt;BR /&gt;c.cpp&lt;BR /&gt;c.h&lt;BR /&gt;file1&lt;BR /&gt;file2&lt;BR /&gt;x.html&lt;BR /&gt;x1.html&lt;BR /&gt;x2.html&lt;BR /&gt;y.xml&lt;BR /&gt;&lt;BR /&gt;is there a way that I can grep all the files that have *.cpp extension and all the files that dont have the html extensions&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ls -1 | grep [*.cpp|!*.html]&lt;BR /&gt;I know the !.html will not work..how do I fix it?&lt;BR /&gt;&lt;BR /&gt;thank you</description>
      <pubDate>Thu, 24 May 2007 14:57:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006845#M96216</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2007-05-24T14:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: grep but not grep</title>
      <link>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006846#M96217</link>
      <description>Since you want only the .cpp files try the one below:&lt;BR /&gt;&lt;BR /&gt;# ls -1 | grep ".cpp$"</description>
      <pubDate>Thu, 24 May 2007 15:07:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006846#M96217</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-05-24T15:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: grep but not grep</title>
      <link>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006847#M96218</link>
      <description>Use the -v grep option as the not operator and you should anchor your search string so that you only look at suffixes. &lt;BR /&gt;&lt;BR /&gt;ls -1 | grep -v -E '\.html$' &lt;BR /&gt;will list all files except those with .html suffixes. Note that the "\" is needed to escape the "." in regular expressions.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 24 May 2007 15:10:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006847#M96218</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-05-24T15:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: grep but not grep</title>
      <link>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006848#M96219</link>
      <description>I apologize for not making myself clear..&lt;BR /&gt;I tried to give a simple example, but that is not what I wanted.&lt;BR /&gt;&lt;BR /&gt;let me give a more closer to real life example&lt;BR /&gt;&lt;BR /&gt;I have the following files&lt;BR /&gt;&lt;BR /&gt;Makefile.defs@@/main/beta/0/Hijacked         Makefile@@/main/beta/0&lt;BR /&gt;JBCINF.sbu&lt;BR /&gt;BCCOM.controller&lt;BR /&gt;alice33.cpp&lt;BR /&gt;file.cpp&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I want to grap all the files except the files that end with @@/main/beta/0&lt;BR /&gt;&lt;BR /&gt;please help out..</description>
      <pubDate>Thu, 24 May 2007 15:35:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006848#M96219</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2007-05-24T15:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: grep but not grep</title>
      <link>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006849#M96220</link>
      <description>these are two files&lt;BR /&gt;&lt;BR /&gt;Makefile.defs@@/main/beta/0/Hijacked &lt;BR /&gt;&lt;BR /&gt;Makefile@@/main/beta/0&lt;BR /&gt;</description>
      <pubDate>Thu, 24 May 2007 15:36:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006849#M96220</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2007-05-24T15:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: grep but not grep</title>
      <link>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006850#M96221</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# grep -v \@\@/main/beta/0 &lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 24 May 2007 15:41:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006850#M96221</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-05-24T15:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: grep but not grep</title>
      <link>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006851#M96222</link>
      <description>How about something like:&lt;BR /&gt;&lt;BR /&gt;# ls -1 | grep -v "@@/main/beta/0"$&lt;BR /&gt;&lt;BR /&gt;The $ will anchor the string to the end of the line.</description>
      <pubDate>Thu, 24 May 2007 15:43:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006851#M96222</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2007-05-24T15:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: grep but not grep</title>
      <link>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006852#M96223</link>
      <description>got it ! thank you!!!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 24 May 2007 16:10:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006852#M96223</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2007-05-24T16:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: grep but not grep</title>
      <link>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006853#M96224</link>
      <description>&lt;P&gt;ls *.cpp would list all of the .cpp.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I have the following files&lt;BR /&gt;Makefile.defs@@/main/beta/0/Hijacked&lt;BR /&gt;&lt;BR /&gt;How can you get those files to show up in clearcase? ls -1 wouldn't ordinarily show multiple directory levels unless you used -R and it wouldn't descend into the @@ paths.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;I want to grab all the files except the files that end with @@/main/beta/0﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the shell Composite patterns﻿:&lt;/P&gt;&lt;P&gt;ls -1 !(@@/main/beta/0﻿﻿)&lt;/P&gt;</description>
      <pubDate>Sun, 02 Oct 2011 06:13:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006853#M96224</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-10-02T06:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: grep but not grep</title>
      <link>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006854#M96225</link>
      <description>Hi,&lt;BR /&gt;better to use:&lt;BR /&gt;grep -v \@\@/main/beta/0$ to be sure that teh search path be at the end.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Fri, 25 May 2007 02:51:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/grep-but-not-grep/m-p/4006854#M96225</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2007-05-25T02:51:36Z</dc:date>
    </item>
  </channel>
</rss>

