Remsh and .cshrc

2007-12-24 20:40:00

This is a multi-part message in MIME format.
--------------2CD3DBF602299788C9B88DA5
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello Sun Managers,

I need to figure out how determine from the .cshrc file the command line
that will be executed by remsh.

For instance, to execute "uname -a" on a remote system a user executes

remsh other-host some-command parameter1

When this is executed on the other-host, first the .cshrc is executed,
then some-command with parameter1.

I need to determine from the user's .cshrc what are the "some-command"
and "parameter1". I checked "env", "set", and argv. The command and
parameters are not there.

I would very much appreciate any help.

In case you wonder why do I need that here is the story. All my users
work in ClearCase environment. If you do not know what ClearCase is
consider yourself lucky.

To simplify the operation our users always have /bin/csh in the passwd
entry, and have the same .cshrc in the home directory, which sources a
bunch of other common controlled by administrators files to set user's
environment. One of the files is a script to set user's ClearCase view.

The ClearCase setview command has (just like csh) an interactive and a
non-interactive mode. In interactive mode it opens a shell. In
non-interactive mode it executes a command specified in the setview
command line and exits.

When running locally this script opens an interactive shell under the
view, and it works.

The remsh with the command runs in non-interactive mode. Accordingly, I
need to execute the setview in the same, non-interactive mode, with the
same command line. The problem is that I do not know from where I can
get it.

Thank you,

Boris Vinarsky
--------------2CD3DBF602299788C9B88DA5
Content-Type: text/x-vcard; charset=us-ascii;
name="boris.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Boris Vinarsky
Content-Disposition: attachment;
filename="boris.vcf"

begin:vcard
n:Vinarsky;Boris
tel;pager:(408) 939-6771
tel;cell:(650)799-5842
tel;fax:(408) 894-5209
tel;home:(650) 573-8242
tel;work:(408) 324-7253
x-mozilla-html:FALSE
url:www.maxtor.com
org:Maxtor;Electornic Development
adr:;;500 McCarthy Blvd.;Milpitas;CA;95035;USA
version:2.1
email;internet:boris at maxtor.com
title:Lead System Administrator
x-mozilla-cpt:;-29168
fn:BV
end:vcard

--------------2CD3DBF602299788C9B88DA5--

Comments

Got something to say?

You must be logged in to post a comment.