<?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: Find the String-need help in Script in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4923000#M104579</link>
    <description>&lt;BR /&gt;&lt;BR /&gt;Well , it is not enitrely clear to me what syntax/filenames you can rely on&amp;gt;&lt;BR /&gt;An answer to your last question might be:&lt;BR /&gt;&lt;BR /&gt;grep `awk '(NR==8){print substr($0,5,3)}' abc.txt` xyz.txt | cut -f 2 -d=  &lt;BR /&gt;&lt;BR /&gt;Here is what that does for me:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; cat x&lt;BR /&gt;wergewrgwehrweh&lt;BR /&gt;rthwrthrwthrwth&lt;BR /&gt;etrrgertgwetrgw&lt;BR /&gt;122345XXX124253&lt;BR /&gt;fw34t23t2yt5425y&lt;BR /&gt;&amp;gt; cat y&lt;BR /&gt;erfer=1244&lt;BR /&gt;XXX=test&lt;BR /&gt;agrwe&lt;BR /&gt;&amp;gt; grep `awk '(NR==8){print substr($0,7,3)}' x` y | cut -f 2 -d=&lt;BR /&gt;&lt;BR /&gt;test&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If this does not get you going, then you may want to re-reply with (a text attachment with) a sample input file set and sample output action.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 01 Sep 2005 23:37:39 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2005-09-01T23:37:39Z</dc:date>
    <item>
      <title>Find the String-need help in Script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4922997#M104576</link>
      <description>HI all,&lt;BR /&gt;&lt;BR /&gt;I have a file abc.txt,i want to search a word like abc in 5the column and 8th row,once i find that word,i should compare that string(find the string) to another file xyz.txt,once it match the abc.txt wil move to some other folder like /tmp --need script for help</description>
      <pubDate>Thu, 01 Sep 2005 21:39:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4922997#M104576</guid>
      <dc:creator>Karthick K S</dc:creator>
      <dc:date>2005-09-01T21:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Find the String-need help in Script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4922998#M104577</link>
      <description>&lt;BR /&gt;Here is how to get a list of files that contain a string found in an other file on a viven line, in a given column:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;grep -l `awk '(NR==8){print substr($0,5,3)}' abc.txt` *.txt&lt;BR /&gt;&lt;BR /&gt;I'm sure you can take it form there...&lt;BR /&gt;(Oh... and it will find abc.txt :-)&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Sep 2005 23:07:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4922998#M104577</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-09-01T23:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Find the String-need help in Script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4922999#M104578</link>
      <description>Thanks for your script,&lt;BR /&gt;&lt;BR /&gt;But I Once i find that abc word from abc.txt then i will find that word in xyz.txt to get the variable&lt;BR /&gt;&lt;BR /&gt;for eg:&lt;BR /&gt;In xyz.txt&lt;BR /&gt;xyz=abc&lt;BR /&gt;&lt;BR /&gt;i want to output abc</description>
      <pubDate>Thu, 01 Sep 2005 23:11:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4922999#M104578</guid>
      <dc:creator>Karthick K S</dc:creator>
      <dc:date>2005-09-01T23:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Find the String-need help in Script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4923000#M104579</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Well , it is not enitrely clear to me what syntax/filenames you can rely on&amp;gt;&lt;BR /&gt;An answer to your last question might be:&lt;BR /&gt;&lt;BR /&gt;grep `awk '(NR==8){print substr($0,5,3)}' abc.txt` xyz.txt | cut -f 2 -d=  &lt;BR /&gt;&lt;BR /&gt;Here is what that does for me:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; cat x&lt;BR /&gt;wergewrgwehrweh&lt;BR /&gt;rthwrthrwthrwth&lt;BR /&gt;etrrgertgwetrgw&lt;BR /&gt;122345XXX124253&lt;BR /&gt;fw34t23t2yt5425y&lt;BR /&gt;&amp;gt; cat y&lt;BR /&gt;erfer=1244&lt;BR /&gt;XXX=test&lt;BR /&gt;agrwe&lt;BR /&gt;&amp;gt; grep `awk '(NR==8){print substr($0,7,3)}' x` y | cut -f 2 -d=&lt;BR /&gt;&lt;BR /&gt;test&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If this does not get you going, then you may want to re-reply with (a text attachment with) a sample input file set and sample output action.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Sep 2005 23:37:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4923000#M104579</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-09-01T23:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Find the String-need help in Script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4923001#M104580</link>
      <description>Ok,Thanks one more loop i need to search&lt;BR /&gt;eg:&lt;BR /&gt;&lt;BR /&gt;abc.txt&lt;BR /&gt;THe&lt;BR /&gt;Luck to the word&lt;BR /&gt;jl abc llk&lt;BR /&gt;&lt;BR /&gt;xyz.txt&lt;BR /&gt;Land ...&lt;BR /&gt;abc = test&lt;BR /&gt;&lt;BR /&gt;i want to take a string abc from abc.txt then if that string(abc) is present in xyz.txt then output of abc will diplay(Output:test) then the file abc.txt will move to /tmp folder</description>
      <pubDate>Fri, 02 Sep 2005 00:45:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4923001#M104580</guid>
      <dc:creator>Karthick K S</dc:creator>
      <dc:date>2005-09-02T00:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Find the String-need help in Script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4923002#M104581</link>
      <description>You can do it as,&lt;BR /&gt;&lt;BR /&gt;if [[ $(awk '(NR==8) { print $5; }' abc.txt) = "abc" ]]&lt;BR /&gt;then&lt;BR /&gt;   awk -F"=" '/abc/ { print $2 }' xyz.txt&lt;BR /&gt;   mv abc.txt /tmp&lt;BR /&gt;fi   &lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Fri, 02 Sep 2005 00:51:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4923002#M104581</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-09-02T00:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Find the String-need help in Script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4923003#M104582</link>
      <description>====&lt;BR /&gt;i want to take a string abc from abc.txt then if that string(abc) is present in xyz.txt then output of abc will diplay(Output:test) then the file abc.txt will move to /tmp folder&lt;BR /&gt;====&lt;BR /&gt;&lt;BR /&gt;If you want to search abc anywhere in abc.txt and print Ouput: test then,&lt;BR /&gt;&lt;BR /&gt;awk -F"=" '/abc/ { print "Ouput:"$2 }' xyz.txt&lt;BR /&gt;mv abc.txt /tmp&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;</description>
      <pubDate>Fri, 02 Sep 2005 01:41:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4923003#M104582</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-09-02T01:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Find the String-need help in Script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4923004#M104583</link>
      <description>Thanks Everyone to give the solution my script is working</description>
      <pubDate>Fri, 02 Sep 2005 04:05:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-the-string-need-help-in-script/m-p/4923004#M104583</guid>
      <dc:creator>Karthick K S</dc:creator>
      <dc:date>2005-09-02T04:05:58Z</dc:date>
    </item>
  </channel>
</rss>

