rlogin in csh

how to use/do rlogin in csh script?
abc88Asked:
Who is Participating?
 
TintinConnect With a Mentor Commented:
I would not recommend rlogin for the task, nor would I recommend scripting in csh.

What I would recommend is writing the bourne/ksh/bash script that uses ssh to talk to the remote server, eg:

#!/bin/sh

echo "Some local tasks"
ssh linuxserver "/command/to/compile"
echo "more local processing"

0
 
TintinCommented:
The same way you'd do it in any shell, ie:

#!/bin/csh
rlogin hostname

However, I suspect that you forgot to give the full details as to exactly what you wanted to do.
0
 
abc88Author Commented:
ok.... what I need to do is that I would like to write a csh script to do some task on Sun machine and then rlogin to Linux machine to compile the task. And, then back to Sun machine to continue subsequent task. So, what I need to know is how to integrate the rlogin command into csh for the purpose above or automate the task..
0
 
abc88Author Commented:
Well, before the compilation there are some variable that I need to setenv....

Can I still use ssh?
0
 
TintinCommented:
Sure.

For example to run make and set the CC environment variable to gcc, do

ssh hostname "cd /some/dir;CC=gcc make"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.