Automated logins and file transfers from a KSh script ?
Joe Muller
joem at nos850.UUCP
Wed Feb 13 01:12:28 AEST 1991
I am attempting to write a Korn Shell script for a cron that would automate
the kermiting of files from a VAX/VMS system to an HP UX system. So far I
have had very limited success; it can cu to our modem (/dev/ttyAp5), and
after removing the LCK file, it echoes commands to the modem. So far I have
been able to get it to successfuly dial out from a script, but what I have been
having problems with is getting it to wait for a proper response before
echoing the next command to the modem. I have tried cu'ing to the modem with
this command:
cu -l/dev/ttyAp5 -s2400 | tee -a log
and then taking the response from the other machine as being the last line in
the file 'log.' However, I am having difficulties in getting this to work
correctly. What I would like to do is write an 'expect' command that
would have the script wait for a proper response from a command echoed to
the device. I could always just have the script sleep inbetween commands, but
this assumes that the connection has already been made. If anybody has
done something similiar to this, or can offer any advice or suggestions,
please post them here.
More information about the Comp.unix.shell
mailing list