Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting a Text Entry Into a File Via rsh

Status
Not open for further replies.

Michael42

Programmer
Oct 8, 2001
1,454
US
On a network composed of Solaris 8 workstations I need to insert an entry into a file that resides on all of them.

I tried this on one host: rsh hostx echo mytextentry >> /nsr/res/servers

Though I have confirmed rsh is working correctly on the host I am trying to rsh to, the entry is not being added.

How can I do this?

Thanks for your suggestions,
Michael
 
You'll probably find it's been added to that file on the host you're running the rsh command from. Try:

[tt]rsh hostx "echo mytextentry >> /nsr/res/servers"[/tt]

Without quoting the command the >> redirection would have been interpreted by your current shell, not the one that was run on the remote system. Annihilannic.
 
>> You'll probably find it's been added to that file on the host

Yes thanks again (and again) Annihilannic! :) Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top