<?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: Help in Scripting. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-scripting/m-p/4666349#M677696</link>
    <description>&lt;BR /&gt;The 1-4 steps can be done using the following script. This will compare the files every 10 sec and send the difference to final.log&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  touch final.log&lt;BR /&gt;  while true;do&lt;BR /&gt;  diff test.log newtest.log &amp;gt;&amp;gt; final.log&lt;BR /&gt;  cp test.log newtest.log&lt;BR /&gt;  sleep 10&lt;BR /&gt;  done&lt;BR /&gt;&lt;BR /&gt;I am not clear the step 5, can you elaborate?</description>
    <pubDate>Tue, 27 Jul 2010 15:29:09 GMT</pubDate>
    <dc:creator>N,Vipin</dc:creator>
    <dc:date>2010-07-27T15:29:09Z</dc:date>
    <item>
      <title>Help in Scripting.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-scripting/m-p/4666347#M677694</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am very new to scripting.I need to develop one script that suit the following condition.&lt;BR /&gt;&lt;BR /&gt;1. Intially i have two files test.log and newtest.log (contents are same).&lt;BR /&gt;&lt;BR /&gt;2. The first file (test.log)will be keep on updating.&lt;BR /&gt;&lt;BR /&gt;3. I need to take the difference (no of new lines added )and copy the new lines to another log file (say final.log).&lt;BR /&gt; &lt;BR /&gt;4. Copy the test.log to newtest.log.&lt;BR /&gt;&lt;BR /&gt;5. In the file one if a text is matching for say 4 or 5 times i need to add a new line in another  log file.&lt;BR /&gt;&lt;BR /&gt;Any suggestion or help will be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance..&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Jul 2010 04:29:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-scripting/m-p/4666347#M677694</guid>
      <dc:creator>Anish Kumar</dc:creator>
      <dc:date>2010-07-27T04:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help in Scripting.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-scripting/m-p/4666348#M677695</link>
      <description>&lt;!--!*#--&gt;Are the files sorted?  If so you can use comm(1):&lt;BR /&gt;comm -23 test.log newtest.log &amp;gt; final.log&lt;BR /&gt;4) cp test.log newtest.log &lt;BR /&gt;5)&lt;BR /&gt;if [ ! -s final.log ]; then&lt;BR /&gt;   if [ ! -f count.log ]; then&lt;BR /&gt;      echo "5" &amp;gt; count.log&lt;BR /&gt;   fi&lt;BR /&gt;   match_count=$(&amp;lt; count.log)&lt;BR /&gt;   (( match_count -= 1 ))&lt;BR /&gt;   if [ $match_count -lt 0 ]; then&lt;BR /&gt;      echo "No changes in 5 compares" &amp;gt;&amp;gt; another_log_file&lt;BR /&gt;      match_count=5&lt;BR /&gt;   fi&lt;BR /&gt;   echo "$match_count" &amp;gt; count.log&lt;BR /&gt;fi</description>
      <pubDate>Tue, 27 Jul 2010 08:38:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-scripting/m-p/4666348#M677695</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-07-27T08:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help in Scripting.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-in-scripting/m-p/4666349#M677696</link>
      <description>&lt;BR /&gt;The 1-4 steps can be done using the following script. This will compare the files every 10 sec and send the difference to final.log&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  touch final.log&lt;BR /&gt;  while true;do&lt;BR /&gt;  diff test.log newtest.log &amp;gt;&amp;gt; final.log&lt;BR /&gt;  cp test.log newtest.log&lt;BR /&gt;  sleep 10&lt;BR /&gt;  done&lt;BR /&gt;&lt;BR /&gt;I am not clear the step 5, can you elaborate?</description>
      <pubDate>Tue, 27 Jul 2010 15:29:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-in-scripting/m-p/4666349#M677696</guid>
      <dc:creator>N,Vipin</dc:creator>
      <dc:date>2010-07-27T15:29:09Z</dc:date>
    </item>
  </channel>
</rss>

