Do you have a question? Post it now! No Registration Necessary. Now with pictures!
February 7, 2008, 2:12 pm
rate this thread
I am new to perl programming on unix, I am trying to ssh to another
box, here is the code I have written,
system ("ssh mygoodbox; mv x y; exit;) ;
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
Re: ssh using system call
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);
"You can only be young once. But you can always be immature." -- Dave Barry