<?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 Script question ! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297566#M880656</link>
    <description>Hi ,&lt;BR /&gt;&lt;BR /&gt;I have a file (name.txt) with list of names &lt;BR /&gt;(one name in line) ,&lt;BR /&gt;i want to check if any name exist in other file&lt;BR /&gt;(name.log ).&lt;BR /&gt;&lt;BR /&gt;I know it's a play with grep,awk,cut ..&lt;BR /&gt;&lt;BR /&gt;any ideas ?&lt;BR /&gt;&lt;BR /&gt;BYE.</description>
    <pubDate>Mon, 07 Jun 2004 06:36:33 GMT</pubDate>
    <dc:creator>chapaya_1</dc:creator>
    <dc:date>2004-06-07T06:36:33Z</dc:date>
    <item>
      <title>Script question !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297566#M880656</link>
      <description>Hi ,&lt;BR /&gt;&lt;BR /&gt;I have a file (name.txt) with list of names &lt;BR /&gt;(one name in line) ,&lt;BR /&gt;i want to check if any name exist in other file&lt;BR /&gt;(name.log ).&lt;BR /&gt;&lt;BR /&gt;I know it's a play with grep,awk,cut ..&lt;BR /&gt;&lt;BR /&gt;any ideas ?&lt;BR /&gt;&lt;BR /&gt;BYE.</description>
      <pubDate>Mon, 07 Jun 2004 06:36:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297566#M880656</guid>
      <dc:creator>chapaya_1</dc:creator>
      <dc:date>2004-06-07T06:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Script question !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297567#M880657</link>
      <description>Check this:&lt;BR /&gt;&lt;BR /&gt;for i in `cat name.txt`&lt;BR /&gt;do&lt;BR /&gt;grep $i name.log&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;sks</description>
      <pubDate>Mon, 07 Jun 2004 06:42:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297567#M880657</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-06-07T06:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Script question !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297568#M880658</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;BR /&gt;&lt;BR /&gt;FILES_LOG=name.log&lt;BR /&gt;FILES_TXT=`cat name.txt`&lt;BR /&gt;for FILE_TO_CHK in $FILES_TXT&lt;BR /&gt;do&lt;BR /&gt;  FOUND=`grep $FILE_TO_CHK $FILES_TXT|wc -w`&lt;BR /&gt;  if ["$FOUND" ! = "0" ]&lt;BR /&gt;  then&lt;BR /&gt;     echo "File $FILE_TO_CHK found into $FILES_LOG"&lt;BR /&gt;  fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;If you need an exact name search try with "grep -x" option.&lt;BR /&gt;&lt;BR /&gt;Rgds.</description>
      <pubDate>Mon, 07 Jun 2004 06:47:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297568#M880658</guid>
      <dc:creator>Jose Mosquera</dc:creator>
      <dc:date>2004-06-07T06:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Script question !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297569#M880659</link>
      <description>grep -f name.txt name.log&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 07 Jun 2004 06:48:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297569#M880659</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2004-06-07T06:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Script question !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297570#M880660</link>
      <description>harry!&lt;BR /&gt; &lt;BR /&gt;Now THAT is a new one on me, thanks a lot.&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;No points for this post please.</description>
      <pubDate>Mon, 07 Jun 2004 06:53:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297570#M880660</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-06-07T06:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Script question !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297571#M880661</link>
      <description>Mark,&lt;BR /&gt;&lt;BR /&gt;And if you install GNU's grep, you'll find that it can do even more incredible things. &lt;BR /&gt;&lt;BR /&gt;"grep" &amp;amp; "find" are a systems administrator's best friends.&lt;BR /&gt;&lt;BR /&gt;and with the pattern file (named.txt) you can do cool things like "^someword" or "someword$" or "[Tt]hat [Cc]at in a [Hh]at"....&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 07 Jun 2004 06:59:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297571#M880661</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2004-06-07T06:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Script question !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297572#M880662</link>
      <description>What about the 'old' way using cmp[-l -s] fileA fileB.&lt;BR /&gt;The -l option will report the position(in decimal) in the file where the difference occurred.</description>
      <pubDate>Tue, 08 Jun 2004 01:10:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297572#M880662</guid>
      <dc:creator>Kyri Pilavakis</dc:creator>
      <dc:date>2004-06-08T01:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Script question !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297573#M880663</link>
      <description>harry, if you have GNU grep (which you should anyway),&lt;BR /&gt;&lt;BR /&gt;# grep -f name.txt -w name.log&lt;BR /&gt;&lt;BR /&gt;will grep on WORD base, which means that if file.txt contains 'oo.c', harry's grep will also match 'foo.c', but the -w version will not, it will only match the 'oo.c'&lt;BR /&gt;this is exceptionally better if you consider file names as 'name.c.org' and 'blah.foo.sav' in the log&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn [ who would use perl himself ]&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Jun 2004 01:34:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297573#M880663</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-06-08T01:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Script question !</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297574#M880664</link>
      <description>Hi All ,&lt;BR /&gt;&lt;BR /&gt;Sanjay your answer was simple and suitable for my needs .&lt;BR /&gt;&lt;BR /&gt;BYE.</description>
      <pubDate>Tue, 08 Jun 2004 04:59:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question/m-p/3297574#M880664</guid>
      <dc:creator>chapaya_1</dc:creator>
      <dc:date>2004-06-08T04:59:14Z</dc:date>
    </item>
  </channel>
</rss>

