I'm writing a simple script that does this.
By the way, I"m on hostA.
rsh hostB | cat /etc/passwd
It works on a command line but when I put in the command into a script it outputs /etc/passwd on hostA -> the host that I am on.
Can you assist?