Solved

rlogin in csh

Posted on 2004-09-04
5
536 Views
Last Modified: 2013-12-26
how to use/do rlogin in csh script?
0
Comment
Question by:abc88
  • 3
  • 2
5 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 11986106
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
 

Author Comment

by:abc88
ID: 11993746
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
 
LVL 48

Accepted Solution

by:
Tintin earned 20 total points
ID: 11993763
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
 

Author Comment

by:abc88
ID: 11993810
Well, before the compilation there are some variable that I need to setenv....

Can I still use ssh?
0
 
LVL 48

Expert Comment

by:Tintin
ID: 11993839
Sure.

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

ssh hostname "cd /some/dir;CC=gcc make"
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Is it possible to combine several text files into one big one? (redhat v5 enterprise) 4 81
only14 challenge 19 68
twoTwo  challenge 35 93
zeroFront challenge 7 80
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now