Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!uunet!coplex!nos850!joem From: joem@nos850.UUCP (Joe Muller) Newsgroups: comp.unix.shell Subject: Automated logins and file transfers from a KSh script ? Keywords: cron, cu, VAX, VMS, HP UX, Kermit Message-ID: <228@nos850.UUCP> Date: 12 Feb 91 14:12:28 GMT Organization: US Naval Ordnance Station Louisville, KY Lines: 20 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.