<?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 DP command on a script inside the cron in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/dp-command-on-a-script-inside-the-cron/m-p/3722188#M253036</link>
    <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I'm trying to execute a Data Protector command inside an script, the script executed interactivly runs ok but when I execute it from the cron the result is not good at all. The command inside the script are the following:&lt;BR /&gt;-----------------------------------------------------&lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;uma=/opt/omni/lbin/uma&lt;BR /&gt;wdir=/home/fgarcia/scripts/tapes/vaulting&lt;BR /&gt;device=/dev/rac/ESL_picker&lt;BR /&gt;&lt;BR /&gt;${uma} -ioctl ${device} -barcode &amp;lt; ${wdir}/log/uma_X.in &amp;gt; ${wdir}/log/Xslots_free.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;#${uma} -ioctl ${device} -barcode &amp;lt; ${statx} &amp;gt; ${wdir}/log/Xslots_free.log&lt;BR /&gt;xSlot=$(cat ${wdir}/log/Xslots_free.log|grep -c Empty)&lt;BR /&gt;xSlot=$(expr $xSlot - 9 )&lt;BR /&gt;echo 'Slot x free: ' ${xSlot} &amp;gt;&amp;gt; ${wdir}/log/action.log&lt;BR /&gt;&lt;BR /&gt;-----------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;inside the uma_X.in there is only one instruction stat x, so the script should return inside the Xslots_free.log file the status of the removable slots of the library. &lt;BR /&gt;The contents of the file Xslots_free.log in a normal run is:&lt;BR /&gt;/dev/rac/ESL_picker&amp;gt; stat x&lt;BR /&gt;&lt;BR /&gt;        8192 X1   Full  "000626L2" ""&lt;BR /&gt;        8193 X2   Empty "" ""&lt;BR /&gt;        8194 X3   Empty "" ""&lt;BR /&gt;.......&lt;BR /&gt;&lt;BR /&gt;the contest of the file after a run from the cron is the following:&lt;BR /&gt;)0 UMA HP OpenView OmniBack II A.05.50V15 ^G^A[12:1] ^G^B[2004] ^G^E1138800661 UMA itdcmae6 ^G^A[90:13] (unnamed) (unnamed)&lt;BR /&gt;^D61]15 ^G^A[12:1] ^G^B[2003] ^G^E1138800661 UMA itdcmae6 ^G^A[90:28] Details unknown. (unnamed)V15 ^G^A[12:1] ^G^B[2&lt;BR /&gt;004] ^G^E1138800661 UMA itdcmae6 ^G^A[90:19] (unnamed) (unnamed)^F1 1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have already try with:&lt;BR /&gt;- changing the shell&lt;BR /&gt;- include the same environment variables as root (interactive session)&lt;BR /&gt;- Include the  2&amp;gt;&amp;amp;1 in the entry of the cron&lt;BR /&gt;&lt;BR /&gt;Any idea will be more than wellcome.&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;Federico.</description>
    <pubDate>Wed, 01 Feb 2006 09:30:47 GMT</pubDate>
    <dc:creator>Gianni Bini</dc:creator>
    <dc:date>2006-02-01T09:30:47Z</dc:date>
    <item>
      <title>DP command on a script inside the cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dp-command-on-a-script-inside-the-cron/m-p/3722188#M253036</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I'm trying to execute a Data Protector command inside an script, the script executed interactivly runs ok but when I execute it from the cron the result is not good at all. The command inside the script are the following:&lt;BR /&gt;-----------------------------------------------------&lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;uma=/opt/omni/lbin/uma&lt;BR /&gt;wdir=/home/fgarcia/scripts/tapes/vaulting&lt;BR /&gt;device=/dev/rac/ESL_picker&lt;BR /&gt;&lt;BR /&gt;${uma} -ioctl ${device} -barcode &amp;lt; ${wdir}/log/uma_X.in &amp;gt; ${wdir}/log/Xslots_free.log 2&amp;gt;&amp;amp;1&lt;BR /&gt;#${uma} -ioctl ${device} -barcode &amp;lt; ${statx} &amp;gt; ${wdir}/log/Xslots_free.log&lt;BR /&gt;xSlot=$(cat ${wdir}/log/Xslots_free.log|grep -c Empty)&lt;BR /&gt;xSlot=$(expr $xSlot - 9 )&lt;BR /&gt;echo 'Slot x free: ' ${xSlot} &amp;gt;&amp;gt; ${wdir}/log/action.log&lt;BR /&gt;&lt;BR /&gt;-----------------------------------------------------&lt;BR /&gt;&lt;BR /&gt;inside the uma_X.in there is only one instruction stat x, so the script should return inside the Xslots_free.log file the status of the removable slots of the library. &lt;BR /&gt;The contents of the file Xslots_free.log in a normal run is:&lt;BR /&gt;/dev/rac/ESL_picker&amp;gt; stat x&lt;BR /&gt;&lt;BR /&gt;        8192 X1   Full  "000626L2" ""&lt;BR /&gt;        8193 X2   Empty "" ""&lt;BR /&gt;        8194 X3   Empty "" ""&lt;BR /&gt;.......&lt;BR /&gt;&lt;BR /&gt;the contest of the file after a run from the cron is the following:&lt;BR /&gt;)0 UMA HP OpenView OmniBack II A.05.50V15 ^G^A[12:1] ^G^B[2004] ^G^E1138800661 UMA itdcmae6 ^G^A[90:13] (unnamed) (unnamed)&lt;BR /&gt;^D61]15 ^G^A[12:1] ^G^B[2003] ^G^E1138800661 UMA itdcmae6 ^G^A[90:28] Details unknown. (unnamed)V15 ^G^A[12:1] ^G^B[2&lt;BR /&gt;004] ^G^E1138800661 UMA itdcmae6 ^G^A[90:19] (unnamed) (unnamed)^F1 1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have already try with:&lt;BR /&gt;- changing the shell&lt;BR /&gt;- include the same environment variables as root (interactive session)&lt;BR /&gt;- Include the  2&amp;gt;&amp;amp;1 in the entry of the cron&lt;BR /&gt;&lt;BR /&gt;Any idea will be more than wellcome.&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;Federico.</description>
      <pubDate>Wed, 01 Feb 2006 09:30:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dp-command-on-a-script-inside-the-cron/m-p/3722188#M253036</guid>
      <dc:creator>Gianni Bini</dc:creator>
      <dc:date>2006-02-01T09:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: DP command on a script inside the cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/dp-command-on-a-script-inside-the-cron/m-p/3722189#M253037</link>
      <description>"inside the uma_X.in there is only one instruction stat x"&lt;BR /&gt;&lt;BR /&gt;Does the "stat x" command use a full path name?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 01 Feb 2006 09:34:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/dp-command-on-a-script-inside-the-cron/m-p/3722189#M253037</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2006-02-01T09:34:02Z</dc:date>
    </item>
  </channel>
</rss>

