<?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 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2815717#M828176</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;the % must be quoted,&lt;BR /&gt;replace&lt;BR /&gt;&lt;BR /&gt;sub(%,"",percentage); &lt;BR /&gt;&lt;BR /&gt;with&lt;BR /&gt;&lt;BR /&gt;sub("%","",percentage); &lt;BR /&gt;&lt;BR /&gt;Regards</description>
    <pubDate>Mon, 30 Sep 2002 07:26:59 GMT</pubDate>
    <dc:creator>Andreas Voss</dc:creator>
    <dc:date>2002-09-30T07:26:59Z</dc:date>
    <item>
      <title>script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2815712#M828171</link>
      <description>I have written a script to monitor /var file system.&lt;BR /&gt;&lt;BR /&gt;If it is more than 85% an email will be send.&lt;BR /&gt;&lt;BR /&gt;[root@myserver]/root/home/root $bdf | grep var&lt;BR /&gt;/dev/vg00/lvol8    5572685 4429938  585478   88% /var&lt;BR /&gt;[root@myreserver]/root/home/root $bdf | grep var | awk '{print $5}'&lt;BR /&gt;88%&lt;BR /&gt;&lt;BR /&gt;Once I get the value of 88% from the awk.  How could I do a numeric comparision.  Should I take out the "%" symbol.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Sep 2002 02:21:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2815712#M828171</guid>
      <dc:creator>kholikt</dc:creator>
      <dc:date>2002-09-30T02:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2815713#M828172</link>
      <description>yup&lt;BR /&gt;&lt;BR /&gt;take out the % symbol. &lt;BR /&gt;&lt;BR /&gt;sed 's/%//g' will do this for you.&lt;BR /&gt;&lt;BR /&gt;That's a single quote pointing -&amp;gt; (that way).&lt;BR /&gt;&lt;BR /&gt;you can probably do the entire thing in sed (or awk). &lt;BR /&gt;&lt;BR /&gt;my solution would spawn a lot of shells, because you're using grep, awk and sed. So it's probably not ideal. &lt;BR /&gt;&lt;BR /&gt;Scott.&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Sep 2002 02:29:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2815713#M828172</guid>
      <dc:creator>Scott Van Kalken</dc:creator>
      <dc:date>2002-09-30T02:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2815714#M828173</link>
      <description>#!/usr/bin/sh&lt;BR /&gt;for i in `bdf | grep arch | awk '{print $4}' | sed 's/%//g'`&lt;BR /&gt;do&lt;BR /&gt;        echo $i&lt;BR /&gt;        if [ $i -gt 90 ]&lt;BR /&gt;        then&lt;BR /&gt;                echo "more than 20%"&lt;BR /&gt;        fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Hi This is what my script will do check some filesystem that is more than 90%.&lt;BR /&gt;&lt;BR /&gt;I used the output of bdf                    4096000  884400 3186560   22% /oracle/TRD/saparch&lt;BR /&gt;                   4096000  306480 3759976    8% /oracle/TRA/saparch&lt;BR /&gt;                   4096000   53104 4011376    1% /oracle/TBD/saparch&lt;BR /&gt;                   4096000  270583 3586394    7% /oracle/SBD/saparch&lt;BR /&gt;&lt;BR /&gt;For the for loop how could I also print out the filesystem name that is more than 90%&lt;BR /&gt;&lt;BR /&gt;The current script can only find out filesystem that is more than 90% but it won't give the filesystem name.</description>
      <pubDate>Mon, 30 Sep 2002 04:10:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2815714#M828173</guid>
      <dc:creator>kholikt</dc:creator>
      <dc:date>2002-09-30T04:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2815715#M828174</link>
      <description>using "4096000 306480 3759976 8% /oracle/TRA/saparch" as the output of your bdf, try this&lt;BR /&gt;&lt;BR /&gt;bdf |&lt;BR /&gt;awk '/arch/ {&lt;BR /&gt;percent=$4;&lt;BR /&gt;filesystem=$5;&lt;BR /&gt;percentage=$4;&lt;BR /&gt;sub(%,"",percentage);&lt;BR /&gt;&lt;BR /&gt;if (percentage &amp;gt; "90") printf("%5s%s\n",percent,filesystem);&lt;BR /&gt;}'</description>
      <pubDate>Mon, 30 Sep 2002 04:33:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2815715#M828174</guid>
      <dc:creator>curt larson_1</dc:creator>
      <dc:date>2002-09-30T04:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2815716#M828175</link>
      <description>I have tried but it just returned this error&lt;BR /&gt;&lt;BR /&gt; syntax error The source line is 5.&lt;BR /&gt; The error context is&lt;BR /&gt;                 &amp;gt;&amp;gt;&amp;gt; sub(% &amp;lt;&amp;lt;&amp;lt; ,"",percentage);&lt;BR /&gt; awk: The statement cannot be correctly parsed.&lt;BR /&gt; The source line is 5.</description>
      <pubDate>Mon, 30 Sep 2002 07:23:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2815716#M828175</guid>
      <dc:creator>kholikt</dc:creator>
      <dc:date>2002-09-30T07:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2815717#M828176</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;the % must be quoted,&lt;BR /&gt;replace&lt;BR /&gt;&lt;BR /&gt;sub(%,"",percentage); &lt;BR /&gt;&lt;BR /&gt;with&lt;BR /&gt;&lt;BR /&gt;sub("%","",percentage); &lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Mon, 30 Sep 2002 07:26:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script/m-p/2815717#M828176</guid>
      <dc:creator>Andreas Voss</dc:creator>
      <dc:date>2002-09-30T07:26:59Z</dc:date>
    </item>
  </channel>
</rss>

