<?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: Perl script extension in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/perl-script-extension/m-p/3602441#M104079</link>
    <description>Yes. You can,&lt;BR /&gt;&lt;BR /&gt;Put this in a script file called,&lt;BR /&gt;&lt;BR /&gt;#extrac.pl&lt;BR /&gt;$serial = shift @ARGV or die "please provide serial number to select on";&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;if (/^flag_start/) {&lt;BR /&gt;$save = 1;&lt;BR /&gt;$file = 0;&lt;BR /&gt;undef @lines;&lt;BR /&gt;}&lt;BR /&gt;if (/^flag_stop/) {&lt;BR /&gt;$save = 0;&lt;BR /&gt;push @lines, $_;&lt;BR /&gt;if ($file) {&lt;BR /&gt;print while ($_ = shift @lines );&lt;BR /&gt;}&lt;BR /&gt;print "\n";&lt;BR /&gt;}&lt;BR /&gt;push @lines, $_ if $save;&lt;BR /&gt;$file++ if /$serial/;&lt;BR /&gt;}&lt;BR /&gt;# end #&lt;BR /&gt;&lt;BR /&gt;# perl extract.pl ABC* &amp;gt; serial_no1.log&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;</description>
    <pubDate>Fri, 12 Aug 2005 03:29:38 GMT</pubDate>
    <dc:creator>Muthukumar_5</dc:creator>
    <dc:date>2005-08-12T03:29:38Z</dc:date>
    <item>
      <title>Perl script extension</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-script-extension/m-p/3602439#M104077</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I have a last question on the script provided by Hein below, &lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=947337." target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=947337.&lt;/A&gt;&lt;BR /&gt;Is it possible to extract the pattern for all the file in a directory starting with ABC for example and store the result in one file?&lt;BR /&gt;&lt;BR /&gt;$serial = shift @ARGV or die "please provide serial number to select on";&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;if (/^flag_start/) {&lt;BR /&gt;$save = 1;&lt;BR /&gt;$file = 0;&lt;BR /&gt;undef @lines;&lt;BR /&gt;}&lt;BR /&gt;if (/^flag_stop/) {&lt;BR /&gt;$save = 0; &lt;BR /&gt;push @lines, $_;&lt;BR /&gt;if ($file) {&lt;BR /&gt;print while ($_ = shift @lines );&lt;BR /&gt;}&lt;BR /&gt;print "\n";&lt;BR /&gt;}&lt;BR /&gt;push @lines, $_ if $save;&lt;BR /&gt;$file++ if /$serial/;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for your help&lt;BR /&gt;&lt;BR /&gt;Best Regards&lt;BR /&gt;&lt;BR /&gt;Jerome</description>
      <pubDate>Fri, 12 Aug 2005 03:08:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-script-extension/m-p/3602439#M104077</guid>
      <dc:creator>Chartier Jerome</dc:creator>
      <dc:date>2005-08-12T03:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Perl script extension</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-script-extension/m-p/3602440#M104078</link>
      <description>I'm not sure if I understand the question, but I think you either need&lt;BR /&gt;&lt;BR /&gt;a. glob ()&lt;BR /&gt;b. magic diamond&lt;BR /&gt;c. local @ARGV&lt;BR /&gt;&lt;BR /&gt;a. my @files = glob "ABC*";&lt;BR /&gt;b. my @files = &lt;ABC&gt;; # space is important here&lt;BR /&gt;c. local @ARGV = (&lt;ABC&gt;);&lt;BR /&gt;&lt;BR /&gt;# perldoc -f glob&lt;BR /&gt;# man perlvar&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn&lt;BR /&gt;&lt;/ABC&gt;&lt;/ABC&gt;</description>
      <pubDate>Fri, 12 Aug 2005 03:28:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-script-extension/m-p/3602440#M104078</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-08-12T03:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Perl script extension</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-script-extension/m-p/3602441#M104079</link>
      <description>Yes. You can,&lt;BR /&gt;&lt;BR /&gt;Put this in a script file called,&lt;BR /&gt;&lt;BR /&gt;#extrac.pl&lt;BR /&gt;$serial = shift @ARGV or die "please provide serial number to select on";&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;if (/^flag_start/) {&lt;BR /&gt;$save = 1;&lt;BR /&gt;$file = 0;&lt;BR /&gt;undef @lines;&lt;BR /&gt;}&lt;BR /&gt;if (/^flag_stop/) {&lt;BR /&gt;$save = 0;&lt;BR /&gt;push @lines, $_;&lt;BR /&gt;if ($file) {&lt;BR /&gt;print while ($_ = shift @lines );&lt;BR /&gt;}&lt;BR /&gt;print "\n";&lt;BR /&gt;}&lt;BR /&gt;push @lines, $_ if $save;&lt;BR /&gt;$file++ if /$serial/;&lt;BR /&gt;}&lt;BR /&gt;# end #&lt;BR /&gt;&lt;BR /&gt;# perl extract.pl ABC* &amp;gt; serial_no1.log&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Aug 2005 03:29:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-script-extension/m-p/3602441#M104079</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-08-12T03:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Perl script extension</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-script-extension/m-p/3602442#M104080</link>
      <description>sorry. You have to give SerialKey too so,&lt;BR /&gt;&lt;BR /&gt;# perl extract.pl &lt;SERIAL-KEY&gt; ABC*&lt;BR /&gt;&lt;BR /&gt;while (&amp;lt;&amp;gt;){} - will get data from all input files.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;# perl extract.pl Serialkey1 ABC* &amp;gt; serialkey.tmp&lt;BR /&gt;&lt;BR /&gt;There is another solution in this thread,&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=947337" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=947337&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;&lt;BR /&gt;&lt;/SERIAL-KEY&gt;</description>
      <pubDate>Fri, 12 Aug 2005 03:34:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-script-extension/m-p/3602442#M104080</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-08-12T03:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Perl script extension</title>
      <link>https://community.hpe.com/t5/operating-system-linux/perl-script-extension/m-p/3602443#M104081</link>
      <description>Many thanks to all of you ...&lt;BR /&gt;&lt;BR /&gt;It is working now ... ;)&lt;BR /&gt;&lt;BR /&gt;Jerome</description>
      <pubDate>Fri, 12 Aug 2005 04:00:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/perl-script-extension/m-p/3602443#M104081</guid>
      <dc:creator>Chartier Jerome</dc:creator>
      <dc:date>2005-08-12T04:00:18Z</dc:date>
    </item>
  </channel>
</rss>

