I have some machines that I have to dial into but it will be done automatically passing the password without any user interaction. I know how to cu to a machine cu -s(baud rate) phone-number | tee out_file but I don't know how to get the parameters passed and was told I need to write a shell script to do this. I am terrible at writing shells. What I'm needing to do is:
I'll run the cu -s1200 tel_num | tee out_file
The machine will then display connected and I will need to send it a \n (newline).
The other machine will expect a password and I will need to send it one (this password will be coming from a file).
I will then send it a command once logged in called test for example which will run a program and generate a file which will go to the out_file in the first command.
When this is thru, I will want to send it a bye\n (bye and newline) and then ~.\n to logout.
Any help will be greatly appreciated.