<?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: script help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3200209#M166487</link>
    <description># perl -MFile::Find -le'find(sub{m/FILE_\d{14}_(\d\d)_(\d{4})$/ or return;ref$n{$1}or$n{$1}={n=&amp;gt;$2,x=&amp;gt;$2};$n{$1}{n}&amp;gt;$2 and$n{$1}{n}=$2;$n{$1}{x}&amp;lt;$2 and$n{$1}{x}=$2},".");for(sort{$a&amp;lt;=&amp;gt;$b}keys%n){printf"node %2d %4d .. %4d\n",$_,@{$n{$_}}{"n","x"}}'&lt;BR /&gt;&lt;BR /&gt;Would show the list of nodes with the min and max seq received&lt;BR /&gt;&lt;BR /&gt;# perl -MFile::Find -le'find(sub{m/FILE_\d{14}_(\d\d)_(\d{4})$/ or return;ref$n{$1}{$2}++},".");for(sort{$a&amp;lt;=&amp;gt;$b}keys%n){@x=sort{$a&amp;lt;=&amp;gt;$b}values%{$n{$_}};printf"node %2d %4d .. %4d\n",$_,$x[0],$x[-1]'&lt;BR /&gt;&lt;BR /&gt;should do the same using more memory, but is easier to extend to see if the range is complete&lt;BR /&gt;&lt;BR /&gt;# perl -MFile::Find -le'find(sub{m/FILE_\d{14}_(\d\d)_(\d{4})$/ or return;ref$n{$1}{$2}++},".");for(sort{$a&amp;lt;=&amp;gt;$b}keys%n){@x=sort{$a&amp;lt;=&amp;gt;$b}values%{$n{$_}};evalqq{\@y="$x[0]".."$x[-1]"};printf"node %2d %4d .. %4d %s\n",$_,$x[0],$x[-1],"@x"eq"@y"?"complete":"incomplete"'&lt;BR /&gt;&lt;BR /&gt;All off top of my head. Nothing tested&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
    <pubDate>Tue, 24 Feb 2004 02:12:20 GMT</pubDate>
    <dc:creator>H.Merijn Brand (procura</dc:creator>
    <dc:date>2004-02-24T02:12:20Z</dc:date>
    <item>
      <title>script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3200208#M166486</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Does anyone have a script which could find missing sequences? Here is our scenariio, we receive files &lt;BR /&gt;(eg. FILE_yyyymmddhhmmss_nn_ssss, where nn is a particular node number ie. 34 &amp;amp; ssss is a &lt;BR /&gt;sequence number ranging from 0001 - 9999) from an external system which is further processed. &lt;BR /&gt;What we need to do is run a script daily to ensure that for each node (nn) all its files/sequences for a&lt;BR /&gt;day has been received. The output of the script should write to a file all the missing sequnces per node.&lt;BR /&gt;Any ideas on how we could script this check?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!</description>
      <pubDate>Tue, 24 Feb 2004 00:19:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3200208#M166486</guid>
      <dc:creator>Edgar_8</dc:creator>
      <dc:date>2004-02-24T00:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3200209#M166487</link>
      <description># perl -MFile::Find -le'find(sub{m/FILE_\d{14}_(\d\d)_(\d{4})$/ or return;ref$n{$1}or$n{$1}={n=&amp;gt;$2,x=&amp;gt;$2};$n{$1}{n}&amp;gt;$2 and$n{$1}{n}=$2;$n{$1}{x}&amp;lt;$2 and$n{$1}{x}=$2},".");for(sort{$a&amp;lt;=&amp;gt;$b}keys%n){printf"node %2d %4d .. %4d\n",$_,@{$n{$_}}{"n","x"}}'&lt;BR /&gt;&lt;BR /&gt;Would show the list of nodes with the min and max seq received&lt;BR /&gt;&lt;BR /&gt;# perl -MFile::Find -le'find(sub{m/FILE_\d{14}_(\d\d)_(\d{4})$/ or return;ref$n{$1}{$2}++},".");for(sort{$a&amp;lt;=&amp;gt;$b}keys%n){@x=sort{$a&amp;lt;=&amp;gt;$b}values%{$n{$_}};printf"node %2d %4d .. %4d\n",$_,$x[0],$x[-1]'&lt;BR /&gt;&lt;BR /&gt;should do the same using more memory, but is easier to extend to see if the range is complete&lt;BR /&gt;&lt;BR /&gt;# perl -MFile::Find -le'find(sub{m/FILE_\d{14}_(\d\d)_(\d{4})$/ or return;ref$n{$1}{$2}++},".");for(sort{$a&amp;lt;=&amp;gt;$b}keys%n){@x=sort{$a&amp;lt;=&amp;gt;$b}values%{$n{$_}};evalqq{\@y="$x[0]".."$x[-1]"};printf"node %2d %4d .. %4d %s\n",$_,$x[0],$x[-1],"@x"eq"@y"?"complete":"incomplete"'&lt;BR /&gt;&lt;BR /&gt;All off top of my head. Nothing tested&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Tue, 24 Feb 2004 02:12:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3200209#M166487</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-02-24T02:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3200210#M166488</link>
      <description>Merijn,&lt;BR /&gt; &lt;BR /&gt;If that is off the top of your head, I'm glad it's your head, not mine!!</description>
      <pubDate>Tue, 24 Feb 2004 02:21:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/3200210#M166488</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-02-24T02:21:58Z</dc:date>
    </item>
  </channel>
</rss>

