<?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: Convert Bash to Perl in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/convert-bash-to-perl/m-p/2996200#M718500</link>
    <description>Why?&lt;BR /&gt;&lt;BR /&gt;Assuming you have perl5.6.1 or up, this could be a start. Warning: I did not even check the syntax :)&lt;BR /&gt;&lt;BR /&gt;#!/your/path/to/perl&lt;BR /&gt;&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;&lt;BR /&gt;# This shell script check the file system increasing size.&lt;BR /&gt;# Put it in the cron for best results ( each 20 minutes is a good idea !!! )&lt;BR /&gt;# Read the File System&lt;BR /&gt;&lt;BR /&gt;open LOG, "&amp;gt;&amp;gt;check_fs.err" or die "check_fs.err: $!";&lt;BR /&gt;for (`df -k`) {&lt;BR /&gt;my ($fs, $sz, $used, $avail, $pct, $mnt) = (m/^(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)%\s+(\S+)/) or next;&lt;BR /&gt;if ($pct &amp;gt; 89) {&lt;BR /&gt;print LOG localtime time;&lt;BR /&gt;print LOG "  The filesystem $fs is at $pct% !!!. Please check the file\n";&lt;BR /&gt;#mail -d rbassoi@yahoo.com.br &amp;lt; check_fs.err&lt;BR /&gt;#cat check_fs.err | mail -s " Warning ! / with $VALUE1%" mixilo@yahoo.com&lt;BR /&gt;#cat check_fs.err | mail -s " Warning ! / with $VALUE1%" awcogo@alcatel.com.br&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;close LOG or die "check_fs.err&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mind that this is only a hint. We're not here to do your job.&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
    <pubDate>Thu, 12 Jun 2003 19:01:00 GMT</pubDate>
    <dc:creator>H.Merijn Brand (procura</dc:creator>
    <dc:date>2003-06-12T19:01:00Z</dc:date>
    <item>
      <title>Convert Bash to Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/convert-bash-to-perl/m-p/2996199#M718499</link>
      <description>&lt;BR /&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;How to convert this script to Perl, anyone has an idea ?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Bassoi</description>
      <pubDate>Thu, 12 Jun 2003 18:25:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/convert-bash-to-perl/m-p/2996199#M718499</guid>
      <dc:creator>Ricardo Bassoi</dc:creator>
      <dc:date>2003-06-12T18:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Bash to Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/convert-bash-to-perl/m-p/2996200#M718500</link>
      <description>Why?&lt;BR /&gt;&lt;BR /&gt;Assuming you have perl5.6.1 or up, this could be a start. Warning: I did not even check the syntax :)&lt;BR /&gt;&lt;BR /&gt;#!/your/path/to/perl&lt;BR /&gt;&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;&lt;BR /&gt;# This shell script check the file system increasing size.&lt;BR /&gt;# Put it in the cron for best results ( each 20 minutes is a good idea !!! )&lt;BR /&gt;# Read the File System&lt;BR /&gt;&lt;BR /&gt;open LOG, "&amp;gt;&amp;gt;check_fs.err" or die "check_fs.err: $!";&lt;BR /&gt;for (`df -k`) {&lt;BR /&gt;my ($fs, $sz, $used, $avail, $pct, $mnt) = (m/^(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)%\s+(\S+)/) or next;&lt;BR /&gt;if ($pct &amp;gt; 89) {&lt;BR /&gt;print LOG localtime time;&lt;BR /&gt;print LOG "  The filesystem $fs is at $pct% !!!. Please check the file\n";&lt;BR /&gt;#mail -d rbassoi@yahoo.com.br &amp;lt; check_fs.err&lt;BR /&gt;#cat check_fs.err | mail -s " Warning ! / with $VALUE1%" mixilo@yahoo.com&lt;BR /&gt;#cat check_fs.err | mail -s " Warning ! / with $VALUE1%" awcogo@alcatel.com.br&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;close LOG or die "check_fs.err&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mind that this is only a hint. We're not here to do your job.&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Thu, 12 Jun 2003 19:01:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/convert-bash-to-perl/m-p/2996200#M718500</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-06-12T19:01:00Z</dc:date>
    </item>
  </channel>
</rss>

