Operating System - HP-UX
1826402 Members
4082 Online
109692 Solutions
New Discussion

how do I automate kermit file transfer

 
Manju Kampli
Trusted Contributor

how do I automate kermit file transfer

Dear friends,

I am able to do interactive file tranfer between two HP-UX systems using modem dialup.
The way I do is
1. kermit -l /dev/ttyd1p0 -m motorola-fastalk
2. kermit>set speed 9600
kermit>set modem flow-controls xon/xoff
kermit>dial

3. press enter and I get login prompt of remote system.. login with user id and password

4. Ctrl+\ and c to get back to kermit prompt
5. send filename
once file transfer is finished, it comes back to kermit prompt
6. exit

How can I put these in a script.

Thanks in advance
Manju
Never stop "LEARNING"
2 REPLIES 2
Ron Kinner
Honored Contributor

Re: how do I automate kermit file transfer

I think it would go something like this:

(sleep 5
echo "\r"
sleep 1
echo "set speed 9600\r"
sleep 1
echo "set modem flow-controls xon/xoff\r"
sleep 3
echo "dial sleep 20
echo "\r"
sleep 5
echo "userid\r"
sleep 2
echo "password\r"
sleep 1
echo "\r"
echo "\r") |kermit -l /dev/ttyd1p0 -m motorola-fastalk


You may not need the \r's and you will have to figure out how to send the ctrl +\ c. Seems like there is a way to send any character by calling its ascii number but I don't remember it.

Ron
Deepak Extross
Honored Contributor

Re: how do I automate kermit file transfer

Have you tried using the command-file option of kermit? Put the commands into a command-file and then invoke
kermit -l /dev/ttyd1p0 -m motorola-fastalk

From the man page of kermit:
kermit [ filename ] [- x arg [- x arg ]...[- yyy ]...]]
where:
filename is the name of a command file to execute...