<?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 expect script - cron and errors.. in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/expect-script-cron-and-errors/m-p/4960447#M101122</link>
    <description>All, &lt;BR /&gt;&lt;BR /&gt;I have an expect script that I have that uses &lt;BR /&gt;scp to move files from one server to another, it is a transactional thing that I put in cron to run every 15 minutes.. I am getting a message in the mailbox:&lt;BR /&gt;&lt;BR /&gt;CRONTAB LINE:&lt;BR /&gt;1,14,30,45 * * * * /usr/local/bin/apphire.sh&lt;BR /&gt;&lt;BR /&gt;MAIL MESSAGE:&lt;BR /&gt;spawn /usr/local/bin/scp /tmp/*apphire.txt root@205.202.254.91:/tmp&lt;BR /&gt;Executing ssh2 failed. Command:' ssh2 -l root -x -a -o passwordprompt %U@%H's password:  -o nodelay yes -o authenticationnotify yes &lt;TARGET ip="" address=""&gt; -s sftp' System error message: &lt;BR /&gt;'No such file or directory'&lt;BR /&gt;send: spawn id exp3 not open&lt;BR /&gt;    while executing&lt;BR /&gt;"send "PASSWORD\r""&lt;BR /&gt;    (file "/usr/local/bin/appput.exp" line 4)&lt;BR /&gt;&lt;BR /&gt;I can run it manually without error. &lt;BR /&gt;&lt;BR /&gt;APPPUT.EXP&lt;BR /&gt;# cat appput.exp&lt;BR /&gt;###############################################&lt;BR /&gt;#!/usr/local/bin/expect&lt;BR /&gt;spawn /usr/local/bin/scp  /tmp/*apphire.txt user@&lt;TARGETIP&gt;:/tmp &lt;BR /&gt;expect "user@&lt;TARGETIP&gt;'s password:"&lt;BR /&gt;send "PASSWORD\r"&lt;BR /&gt;expect "debug: uninitializing event loop"&lt;BR /&gt;send "\r"&lt;BR /&gt;###############################################&lt;BR /&gt;THIS IS THE SCRIPT THAT INITIATES THE PROCESS&lt;BR /&gt;NOTE /usr/local/bin/appput.exp Initiate at the end of the script.. &lt;BR /&gt;APPHIRE.SH&lt;BR /&gt;###############################################&lt;BR /&gt;# cat apphire.sh&lt;BR /&gt;#!/bin/sh &lt;BR /&gt;for dst in `cat /pei/peitools/bin/distid.txt`&lt;BR /&gt;        do &lt;BR /&gt;echo $dst &lt;BR /&gt;export D="$dst" &lt;BR /&gt;export INFORMIXSERVER=pei&lt;BR /&gt;&lt;BR /&gt;                sed s/DIST/"$D"/g /usr/local/bin/apphire.template &amp;gt; /tmp/"$D"apphire.sql &lt;BR /&gt;                sudo -u support /usr/informix/bin/isql "$D"plus &amp;lt; /tmp/"$D"apphire.sql&lt;BR /&gt;done &lt;BR /&gt;/usr/local/bin/appput.exp&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;How would I assure myself the file transfer is completing correctly? Again I can run the file manually and get the following output: &lt;BR /&gt;&lt;BR /&gt;#  apphire.sh&lt;BR /&gt;arl&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;blr&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;con&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;elk&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;esu&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ftc&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;grt&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;mps&lt;BR /&gt;&lt;BR /&gt;12 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;plk&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;plv&lt;BR /&gt;&lt;BR /&gt;61 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;raa&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;raf&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;ral&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;val&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;wat&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;wsf&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;wst&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;spawn /usr/local/bin/scp /tmp/*apphire.txt user@&lt;TARGETIP&gt;:/tmp&lt;BR /&gt;user@&lt;TARGETIP&gt;'s password: &lt;BR /&gt;arlapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;blrapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;conapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;elkapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;esuapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;ftcapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;grtapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;mpsapphire.txt                  |   336B |   0.3 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;plkapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;plvapphire.txt                  |  1.4kB |   1.4 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;raaapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;rafapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;ralapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;valapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;watapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;wsfapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;wstapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;send: spawn id exp4 not open&lt;BR /&gt;    while executing&lt;BR /&gt;"send "\r"&lt;BR /&gt;"&lt;BR /&gt;    (file "/usr/local/bin/appput.exp" line 6)&lt;BR /&gt;&lt;BR /&gt;Any insights appreciated.. &lt;BR /&gt;&lt;BR /&gt;Rex Mueller - Educational Service Unit #3&lt;/TARGETIP&gt;&lt;/TARGETIP&gt;&lt;/TARGETIP&gt;&lt;/TARGETIP&gt;&lt;/TARGET&gt;</description>
    <pubDate>Thu, 16 Feb 2006 11:04:56 GMT</pubDate>
    <dc:creator>rmueller58</dc:creator>
    <dc:date>2006-02-16T11:04:56Z</dc:date>
    <item>
      <title>expect script - cron and errors..</title>
      <link>https://community.hpe.com/t5/operating-system-linux/expect-script-cron-and-errors/m-p/4960447#M101122</link>
      <description>All, &lt;BR /&gt;&lt;BR /&gt;I have an expect script that I have that uses &lt;BR /&gt;scp to move files from one server to another, it is a transactional thing that I put in cron to run every 15 minutes.. I am getting a message in the mailbox:&lt;BR /&gt;&lt;BR /&gt;CRONTAB LINE:&lt;BR /&gt;1,14,30,45 * * * * /usr/local/bin/apphire.sh&lt;BR /&gt;&lt;BR /&gt;MAIL MESSAGE:&lt;BR /&gt;spawn /usr/local/bin/scp /tmp/*apphire.txt root@205.202.254.91:/tmp&lt;BR /&gt;Executing ssh2 failed. Command:' ssh2 -l root -x -a -o passwordprompt %U@%H's password:  -o nodelay yes -o authenticationnotify yes &lt;TARGET ip="" address=""&gt; -s sftp' System error message: &lt;BR /&gt;'No such file or directory'&lt;BR /&gt;send: spawn id exp3 not open&lt;BR /&gt;    while executing&lt;BR /&gt;"send "PASSWORD\r""&lt;BR /&gt;    (file "/usr/local/bin/appput.exp" line 4)&lt;BR /&gt;&lt;BR /&gt;I can run it manually without error. &lt;BR /&gt;&lt;BR /&gt;APPPUT.EXP&lt;BR /&gt;# cat appput.exp&lt;BR /&gt;###############################################&lt;BR /&gt;#!/usr/local/bin/expect&lt;BR /&gt;spawn /usr/local/bin/scp  /tmp/*apphire.txt user@&lt;TARGETIP&gt;:/tmp &lt;BR /&gt;expect "user@&lt;TARGETIP&gt;'s password:"&lt;BR /&gt;send "PASSWORD\r"&lt;BR /&gt;expect "debug: uninitializing event loop"&lt;BR /&gt;send "\r"&lt;BR /&gt;###############################################&lt;BR /&gt;THIS IS THE SCRIPT THAT INITIATES THE PROCESS&lt;BR /&gt;NOTE /usr/local/bin/appput.exp Initiate at the end of the script.. &lt;BR /&gt;APPHIRE.SH&lt;BR /&gt;###############################################&lt;BR /&gt;# cat apphire.sh&lt;BR /&gt;#!/bin/sh &lt;BR /&gt;for dst in `cat /pei/peitools/bin/distid.txt`&lt;BR /&gt;        do &lt;BR /&gt;echo $dst &lt;BR /&gt;export D="$dst" &lt;BR /&gt;export INFORMIXSERVER=pei&lt;BR /&gt;&lt;BR /&gt;                sed s/DIST/"$D"/g /usr/local/bin/apphire.template &amp;gt; /tmp/"$D"apphire.sql &lt;BR /&gt;                sudo -u support /usr/informix/bin/isql "$D"plus &amp;lt; /tmp/"$D"apphire.sql&lt;BR /&gt;done &lt;BR /&gt;/usr/local/bin/appput.exp&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;How would I assure myself the file transfer is completing correctly? Again I can run the file manually and get the following output: &lt;BR /&gt;&lt;BR /&gt;#  apphire.sh&lt;BR /&gt;arl&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;blr&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;con&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;elk&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;esu&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ftc&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;grt&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;mps&lt;BR /&gt;&lt;BR /&gt;12 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;plk&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;plv&lt;BR /&gt;&lt;BR /&gt;61 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;raa&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;raf&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;ral&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;val&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;wat&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;wsf&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;wst&lt;BR /&gt;&lt;BR /&gt;0 row(s) unloaded.&lt;BR /&gt;&lt;BR /&gt;spawn /usr/local/bin/scp /tmp/*apphire.txt user@&lt;TARGETIP&gt;:/tmp&lt;BR /&gt;user@&lt;TARGETIP&gt;'s password: &lt;BR /&gt;arlapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;blrapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;conapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;elkapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;esuapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;ftcapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;grtapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;mpsapphire.txt                  |   336B |   0.3 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;plkapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;plvapphire.txt                  |  1.4kB |   1.4 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;raaapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;rafapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;ralapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;valapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;watapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;wsfapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;wstapphire.txt                  |     0B |   0.0 kB/s | TOC: 00:00:01 | 100%&lt;BR /&gt;send: spawn id exp4 not open&lt;BR /&gt;    while executing&lt;BR /&gt;"send "\r"&lt;BR /&gt;"&lt;BR /&gt;    (file "/usr/local/bin/appput.exp" line 6)&lt;BR /&gt;&lt;BR /&gt;Any insights appreciated.. &lt;BR /&gt;&lt;BR /&gt;Rex Mueller - Educational Service Unit #3&lt;/TARGETIP&gt;&lt;/TARGETIP&gt;&lt;/TARGETIP&gt;&lt;/TARGETIP&gt;&lt;/TARGET&gt;</description>
      <pubDate>Thu, 16 Feb 2006 11:04:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/expect-script-cron-and-errors/m-p/4960447#M101122</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2006-02-16T11:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: expect script - cron and errors..</title>
      <link>https://community.hpe.com/t5/operating-system-linux/expect-script-cron-and-errors/m-p/4960448#M101123</link>
      <description>moved to sysadmin because of Cron issue</description>
      <pubDate>Mon, 20 Feb 2006 10:17:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/expect-script-cron-and-errors/m-p/4960448#M101123</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2006-02-20T10:17:01Z</dc:date>
    </item>
  </channel>
</rss>

