Solved

rlogin in csh

Posted on 2004-09-04
5
535 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 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

12 Experts available now in Live!

Get 1:1 Help Now