rsh write local

rsh write local

Post by Phill Ho » Sat, 22 May 1993 03:56:04



In a bourne shell script I would like to execute a command and write the output to the remote host.
eg..
rsh $host crontab -l>file
rcp file $host:/tmp/file
Writes the output to the local machine, so I have to do the rcp to copy it back to the remote machine.I would like to do this in one step.
Regards,
Phil
 
 
 

rsh write local

Post by Robert Lesl » Sun, 23 May 1993 00:33:05



> In a bourne shell script I would like to execute a command and write the
> output to the remote host.
> eg..
> rsh $host crontab -l>file
> rcp file $host:/tmp/file
> Writes the output to the local machine, so I have to do the rcp to copy it
> back to the remote machine.I would like to do this in one step.

What you need to do is quote the remote command, so that your local shell does
not see the output redirection:

rsh $host 'crontab -l >file'

Cheers,
- Robert Leslie

 
 
 

1. rsh question: Append local file to a remote file

What is the syntax to use if I want to append a local file to a file
on a remote machine? I know that I can use rsh with a command to
do this; what would be the exact syntax?


Thanks
Ritu
--
===========================================================================
Ritu Chadha

Bellcore                                (201) 829-4869

2. Version 3.3

3. Need techniques for rsh to all hosts on local net

4. Yamaha sound on Micron

5. tar backup of a remote machine using rsh onto local tape - how?

6. ttcp for Solaris2

7. rsh with backgrounded command and local variable

8. AGP en S3 ViRGE/GX2

9. Probs rsh on local machine HELP

10. Getting output on local terminal for rsh

11. RSH problems when used in script writing

12. writing a script for rsh

13. how to handle programmers who want to write in /usr/local/include?