[NTLUG:Discuss] OT expect and ftp
Fred James
fredjame at fredjame.cnc.net
Fri Mar 3 12:55:47 CST 2006
All
I have a work around on this (I believe - will know for sure next week),
so I am not so much looking for that kind of help as I am for some
insight if possible.
Situation:
(a) On a UNIX box process creates files and transfers them (ftp) to a
second server (MS Windows - not in my control)
(b) The ftp is handled by an expect script.
(c) Environmental variables are set for the purpose
(c.1) One set of environmental variable is set by '. oraenv <
$SidNameFile' (Oracle supplied)
(c.2) The rest are set by '. $SourceFileName' (my own)
(d) the expect script is call a total of 4 times, once to pass each
created file as it is made.
(d.1) this process has always worked well in other incarnations, but in
this particular case, sending to this particular ftp server
(d.1.1) the first of the 4 calls fails, consistently.
My work around
(e) Before the first regular call, call a modified version of the
expect/ftp script to just try to log on and list the directory
Notes
(f) If I haven't run this process for some time, the first call fails -
otherwise it always works
(g) On running the modified "wake up" version manually (sh -x)
(g.1) The first time I got a screen or so full of stuff pointing to
invalid '\"name\"' in Tcl - not sure I have that stated correctly.
(g.2) Each time after that, the process worked
My question
(h) Any insights would be greatly appreciated - this isn't the first
time I have used this concept, nor will it be the last, but it is the
first time I have seen this particular issue.
Thank you in advance for any help you may be able to offer.
Regards
Fred James
More information about the Discuss
mailing list