| Kevin Collins 2006-08-02, 7:22 pm |
| In article <1154469386.681248.85990@m73g2000cwd.googlegroups.com>,
niki.cho@gmail.com wrote:
> Here is the example.
>
> print "write down the filer: \n";
> chomp($myfiler = <STDIN> );
>
> my $out = `rsh -l root: blabla $myfiler blablabla `
>
>
> I am not sure how to make the above line works.
> Thank you for your advice in advance.
Well, if you had correct rsh syntax, it would probably work - the PERL part
appears correct. A couple reasons it might not work:
1) the userid you are telling rsh to login as is "root:" and probably should be
"root"
2) the userid you are running as has no permission to rsh as root
3) you don't specify a host to the rsh command before your '-l root'
Something like this is probably what you want:
my $out = `rsh my_remote_host -l root /some/command $myfiler`
Kevin
--
Unix Guy Consulting, LLC
Unix and Linux Automation, Shell, PERL and CGI scripting
http://www.unix-guy.com
|