<?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: Post Conversion script not working - copying part of log in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/post-conversion-script-not-working-copying-part-of-log/m-p/3797040#M99757</link>
    <description>I don't know why it didn't show up in my original message but I do have the '+' in the morevar definition:&lt;BR /&gt;&lt;BR /&gt;morevar="more -s +/'$datevar' /dms/log/dms.log";&lt;BR /&gt;&lt;BR /&gt;I tried the suggestion by Christine and it didn't work.&lt;BR /&gt;&lt;BR /&gt;Put in an echo to see how if the date is populated okay and it seems to look fine:&lt;BR /&gt;&lt;BR /&gt;more -s +/'May 31' /dms/log/dms.log&lt;BR /&gt;&lt;BR /&gt;It works from the command line but the script doesn't like it. A real head scratcher...</description>
    <pubDate>Wed, 31 May 2006 06:04:59 GMT</pubDate>
    <dc:creator>Jenny A Case</dc:creator>
    <dc:date>2006-05-31T06:04:59Z</dc:date>
    <item>
      <title>Post Conversion script not working - copying part of log</title>
      <link>https://community.hpe.com/t5/operating-system-linux/post-conversion-script-not-working-copying-part-of-log/m-p/3797036#M99753</link>
      <description>We just converted from a NUMAQ to HP.&lt;BR /&gt;&lt;BR /&gt;The following script worked fine to copy every line from the current date forward:&lt;BR /&gt;&lt;BR /&gt;datevar=$(date +'%b %e');&lt;BR /&gt;morevar="more -s /'$datevar' /dms/log/dms.log";&lt;BR /&gt;echo "$morevar" &amp;gt; temp.sh;&lt;BR /&gt;chmod +x temp.sh;&lt;BR /&gt;temp.sh &amp;gt; dmslog.$(date +%b%d);&lt;BR /&gt;rm temp.sh;&lt;BR /&gt;&lt;BR /&gt;Now on the HP it copies the entire log. If I pick it apart and run everything manually, it works up to the "temp.sh &amp;gt; dmslog.$(date +%b%d);" line. For some reason it seems the redirection to a file causes it to choke, because if I just run the 'temp.sh' it outputs to the screen fine. Am I missing some HP scripting quirk?</description>
      <pubDate>Tue, 30 May 2006 13:57:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/post-conversion-script-not-working-copying-part-of-log/m-p/3797036#M99753</guid>
      <dc:creator>Jenny A Case</dc:creator>
      <dc:date>2006-05-30T13:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Post Conversion script not working - copying part of log</title>
      <link>https://community.hpe.com/t5/operating-system-linux/post-conversion-script-not-working-copying-part-of-log/m-p/3797037#M99754</link>
      <description>Try temp.sh 2&amp;gt;&amp;amp;1 &amp;gt; dmslog.$(date +%b%d);</description>
      <pubDate>Tue, 30 May 2006 14:10:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/post-conversion-script-not-working-copying-part-of-log/m-p/3797037#M99754</guid>
      <dc:creator>Christian Tremblay</dc:creator>
      <dc:date>2006-05-30T14:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: Post Conversion script not working - copying part of log</title>
      <link>https://community.hpe.com/t5/operating-system-linux/post-conversion-script-not-working-copying-part-of-log/m-p/3797038#M99755</link>
      <description>Hi Jenny:&lt;BR /&gt;&lt;BR /&gt;Your script essentially executes 'more -s' against a file.  In HP-UX, the '-s' switch of 'more' squeezes multiple blank lines into one on output.  It doesn't filter anything else.  Hence, your output is going to be the whole input file, less multiple blank lines as noted.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 30 May 2006 14:51:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/post-conversion-script-not-working-copying-part-of-log/m-p/3797038#M99755</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-05-30T14:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Post Conversion script not working - copying part of log</title>
      <link>https://community.hpe.com/t5/operating-system-linux/post-conversion-script-not-working-copying-part-of-log/m-p/3797039#M99756</link>
      <description>Hi (again) Jenny:&lt;BR /&gt;&lt;BR /&gt;OK, I think I see what you want:&lt;BR /&gt;&lt;BR /&gt;In HP-UX you can use 'more +/pattern' to start listing a file two lines above the regular expression 'pattern':&lt;BR /&gt;&lt;BR /&gt;# more +/$datevar filename&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 30 May 2006 15:29:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/post-conversion-script-not-working-copying-part-of-log/m-p/3797039#M99756</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-05-30T15:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Post Conversion script not working - copying part of log</title>
      <link>https://community.hpe.com/t5/operating-system-linux/post-conversion-script-not-working-copying-part-of-log/m-p/3797040#M99757</link>
      <description>I don't know why it didn't show up in my original message but I do have the '+' in the morevar definition:&lt;BR /&gt;&lt;BR /&gt;morevar="more -s +/'$datevar' /dms/log/dms.log";&lt;BR /&gt;&lt;BR /&gt;I tried the suggestion by Christine and it didn't work.&lt;BR /&gt;&lt;BR /&gt;Put in an echo to see how if the date is populated okay and it seems to look fine:&lt;BR /&gt;&lt;BR /&gt;more -s +/'May 31' /dms/log/dms.log&lt;BR /&gt;&lt;BR /&gt;It works from the command line but the script doesn't like it. A real head scratcher...</description>
      <pubDate>Wed, 31 May 2006 06:04:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/post-conversion-script-not-working-copying-part-of-log/m-p/3797040#M99757</guid>
      <dc:creator>Jenny A Case</dc:creator>
      <dc:date>2006-05-31T06:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Post Conversion script not working - copying part of log</title>
      <link>https://community.hpe.com/t5/operating-system-linux/post-conversion-script-not-working-copying-part-of-log/m-p/3797041#M99758</link>
      <description>Sorry that should have been Christian. Thanks for the suggestion anyway. I'll play around with it to see what happens.</description>
      <pubDate>Wed, 31 May 2006 06:08:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/post-conversion-script-not-working-copying-part-of-log/m-p/3797041#M99758</guid>
      <dc:creator>Jenny A Case</dc:creator>
      <dc:date>2006-05-31T06:08:09Z</dc:date>
    </item>
  </channel>
</rss>

