using rlogin inside a csh script

I want to write a small csh script that when runs, it would remote log me into a specified unix terminal and continue with more commands without stopping and without interaction. Here's a small example:

#!/bin/csh
rlogin kansas            (remote login to kansas)
cd $HOME/myfiles    (or any unix command)
ls -la                            (or any unix command)

After launching a script from a like shown, the remote login works fine, but the script stops. At this point I get a unix prompt, but would like the script to finish without my interaction. I'm kindof new at this. Is this possible? If so, what is the solution?

thanks much,
Russ.


ramooreAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
tfewsterConnect With a Mentor Commented:
rlogin is designed to be interactive; Use rsh (remsh on some unixes):
rsh kansas script_on_kansas
rcp kansas:any_log_files created $HOME


0
 
ramooreAuthor Commented:
Thanks tfewster. Using rsh was the answer.
0
All Courses

From novice to tech pro — start learning today.