Aherne Peter-pahern02 wrote:
>> Ok, try to reply to both Niall and Dave in this one.
>> Dave first.
>> Exactely what I want to do:
>> Write a script, first thing the script does is check what machine they are
> on, if they are on the right one do something, if not ask them to choose
> from a list of servers, they choose, they get logged onto that machine, now
> I want to run the same script again automagically, this time they will be on
> the right machine so it will pass the server choice thing and work away.
>> So thats what I want to do in case that gives people any more ideas.
How about the following idea (and this is a rough, off the top of my
head type solution - there's probably heavy lifting left to do here) -
set the script as the .cshrc, and then do this in the .cshrc:
if(We're not on the right server)
# do the menu stuff, get your answer, and then...
rcp .cshrc username at servername:~/.cshrc
rlogin -l username servername
# Maybe it's cheating a bit...
David Neary, E-Mail dave.neary at palamon.ie
Palamon Technologies Ltd. Phone +353-1-634-5059
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!