|
Posted by Glenn Jackman on February 7, 2008, 9:31 am
Please log in for more thread options
At 2008-02-07 09:12AM, "seema" wrote:
> Hi all,
>
> I am new to perl programming on unix, I am trying to ssh to another
> box, here is the code I have written,
>
> #!/usr/bin/perl
> system ("ssh mygoodbox; mv x y; exit;) ;
Missing quote.
> it does ssh sucessfully and mv command also works fine. But controle
> doesnt return even though exit is there. It just stays in that
> machine. Can some body explain how to handle
> this. I am using perl 5.8
If you expect the mv and exit to happen on 'mygoodbox', you're mistaken.
I assume you want the mv command to execute on the remote machine.
See ssh(1) man page:
system qw(ssh mygoodbox mv x y);
--
Glenn Jackman
"You can only be young once. But you can always be immature." -- Dave Barry
|