<?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: Problems on execute script in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943344#M102855</link>
    <description>You if comparision statements are wrong because your volum assignment is wrong.&lt;BR /&gt;&lt;BR /&gt;Why tr and all that??&lt;BR /&gt;&lt;BR /&gt;volum=$(bdf / |grep -v '[F]ilesystem'|awk '{print $5}'|awk -F "%" '{print $1}')&lt;BR /&gt;&lt;BR /&gt;Then your comparisions.&lt;BR /&gt;&lt;BR /&gt;Check your assignment and the one I am giving here. You need to eliminate % from var assignment.</description>
    <pubDate>Tue, 29 Nov 2005 05:36:41 GMT</pubDate>
    <dc:creator>RAC_1</dc:creator>
    <dc:date>2005-11-29T05:36:41Z</dc:date>
    <item>
      <title>Problems on execute script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943343#M102854</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I want to execute the following script but since system was rebooted I can't:&lt;BR /&gt;&lt;BR /&gt;#!/sbin/sh -x&lt;BR /&gt;fs=vgora/lvol5&lt;BR /&gt;max=70&lt;BR /&gt;min=30&lt;BR /&gt;volum="$(bdf |grep $fs | tr -s ' ' '$' | cut -f5 -d $ | cut -c1-2)"&lt;BR /&gt;if [ "$volum" -ge "$max" ]&lt;BR /&gt;then&lt;BR /&gt;remsh omniback /opt/omni/bin/omnib -oracle8_list Oracle_Archivers_Paris_Total 2&amp;gt;&amp;gt; /DES/oracle/arch/scripts/sortida&lt;BR /&gt;&amp;gt;&amp;gt; /DES/oracle/arch/scripts/sortida&lt;BR /&gt;fi&lt;BR /&gt;if [ "$volum" -ge "$min" ] &amp;amp;&amp;amp; [ "$volum" -lt "$max" ]&lt;BR /&gt;then&lt;BR /&gt;remsh omniback /opt/omni/bin/omnib -oracle8_list Oracle_Archivers_Paris 2&amp;gt;&amp;gt; /DES/oracle/arch/scripts/sortida&lt;BR /&gt;&amp;gt;&amp;gt; /DES/oracle/arch/scripts/sortida&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Output I got when I launch script is as follows:&lt;BR /&gt;&lt;BR /&gt;+ fs=vgora/lvol5&lt;BR /&gt;+ max=70&lt;BR /&gt;+ min=30&lt;BR /&gt;+ + bdf&lt;BR /&gt;+ grep vgora/lvol5&lt;BR /&gt;+ tr -s   $&lt;BR /&gt;+ cut -f5 -d $&lt;BR /&gt;+ cut -c1-2&lt;BR /&gt;volum=0%&lt;BR /&gt;+ [ 0% -ge 70 ]&lt;BR /&gt;/DES/oracle/arch/scripts/volum.sh[12]: 0%: Expression is not complete; more tokens expected.&lt;BR /&gt;+ [ 0% -ge 30 ]&lt;BR /&gt;/DES/oracle/arch/scripts/volum.sh[17]: 0%: Expression is not complete; more tokens expected.&lt;BR /&gt;&lt;BR /&gt;Should I modify any kernel parameter?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for your help!&lt;BR /&gt;&lt;BR /&gt;Carles&lt;BR /&gt;&lt;BR /&gt;PS: System is HP-UX B.11.11 U</description>
      <pubDate>Tue, 29 Nov 2005 05:28:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943343#M102854</guid>
      <dc:creator>Carles Viaplana</dc:creator>
      <dc:date>2005-11-29T05:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problems on execute script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943344#M102855</link>
      <description>You if comparision statements are wrong because your volum assignment is wrong.&lt;BR /&gt;&lt;BR /&gt;Why tr and all that??&lt;BR /&gt;&lt;BR /&gt;volum=$(bdf / |grep -v '[F]ilesystem'|awk '{print $5}'|awk -F "%" '{print $1}')&lt;BR /&gt;&lt;BR /&gt;Then your comparisions.&lt;BR /&gt;&lt;BR /&gt;Check your assignment and the one I am giving here. You need to eliminate % from var assignment.</description>
      <pubDate>Tue, 29 Nov 2005 05:36:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943344#M102855</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-11-29T05:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problems on execute script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943345#M102856</link>
      <description>Hi Carles,&lt;BR /&gt;&lt;BR /&gt;maybe it's a stupid question but&lt;BR /&gt;are you sure that file system is mounted&lt;BR /&gt;(fs=vgora/lvol5) ?&lt;BR /&gt;&lt;BR /&gt;regards</description>
      <pubDate>Tue, 29 Nov 2005 05:39:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943345#M102856</guid>
      <dc:creator>Piergiacomo Perini</dc:creator>
      <dc:date>2005-11-29T05:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problems on execute script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943346#M102857</link>
      <description>Thanks for your fast reply,&lt;BR /&gt;&lt;BR /&gt;1st at all, volume and filesystem is mounted.&lt;BR /&gt;&lt;BR /&gt;I'm going to delete % from assignement and execute script.&lt;BR /&gt;&lt;BR /&gt;I know script didn't work fine as volum assignement is wrong, but why does script stop to run since reboot?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Carles</description>
      <pubDate>Tue, 29 Nov 2005 05:59:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943346#M102857</guid>
      <dc:creator>Carles Viaplana</dc:creator>
      <dc:date>2005-11-29T05:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problems on execute script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943347#M102858</link>
      <description>Change this to volum="$(bdf |grep $fs | tr -s ' ' '$' | cut -f5 -d $ | cut -c1-2)"&lt;BR /&gt;&lt;BR /&gt;volum=$(bdf | grep $fs | awk '{ split($5,a,"%");print a[1]; }')&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Tue, 29 Nov 2005 06:03:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943347#M102858</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-11-29T06:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problems on execute script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943348#M102859</link>
      <description>Hello again,&lt;BR /&gt;&lt;BR /&gt;Script works fine now. Thanks a lot!&lt;BR /&gt;&lt;BR /&gt;BTW, is there any way to avoid output messages?&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;&lt;BR /&gt;Carles</description>
      <pubDate>Tue, 29 Nov 2005 07:11:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943348#M102859</guid>
      <dc:creator>Carles Viaplana</dc:creator>
      <dc:date>2005-11-29T07:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problems on execute script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943349#M102860</link>
      <description>Hi Carles:&lt;BR /&gt;&lt;BR /&gt;The use of the '-x' switch causes trace messages to be printed to STDERR during the script's execution.  This is normally only armed for debugging.&lt;BR /&gt;&lt;BR /&gt;Remove the '-x' switch from the interpreter line (#!/sbin/sh) to eliminate the STDERR or redirect STDERR to /dev/null when you execute the script ( e.g. /myscript 2&amp;gt; /dev/null ).&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 29 Nov 2005 07:17:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943349#M102860</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-11-29T07:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Problems on execute script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943350#M102861</link>
      <description>I modified script and now it works fine and doesn't show messages.&lt;BR /&gt;&lt;BR /&gt;Thanks to all for your help.&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Carles&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Nov 2005 08:09:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/problems-on-execute-script/m-p/4943350#M102861</guid>
      <dc:creator>Carles Viaplana</dc:creator>
      <dc:date>2005-11-29T08:09:30Z</dc:date>
    </item>
  </channel>
</rss>

