in reply to Re^3: shell to perl equivalent
in thread shell to perl equivalent
#!/usr/bin/perl sub paranthesis { my @paran = @_; system( 'scp', '/users/myuser/merc/rem_snew.pl', "$remoteuser\@$remoteserver:/users/$remoteuser/tmp/rem_snew2.p +l" ); my $result = `ssh $remoteuser\@$remoteserver perl /users/$remoteuser/tmp/ +rem_snew2.pl`; print "$result\n"; system( 'ssh', "$remoteuser\@$remoteserver", 'rm', "/users/$remoteuser/tmp/rem_snew2.pl" ); } paranthesis(@paran);
perl filename.pl remoteuser remoteserver
ssh: : Hostname and service name not provided or found lost connection usage: ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec +] [-D port] [-e escape_char] [-F configfile] [-i identity_file] [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p +port] [-R [bind_address:]port:host:hostport] [-S ctl_path] [user@]hostname [command] usage: ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec +] [-D port] [-e escape_char] [-F configfile] [-i identity_file] [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p +port] [-R [bind_address:]port:host:hostport] [-S ctl_path] [user@]hostname [command]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: shell to perl equivalent
by graff (Chancellor) on Feb 18, 2008 at 22:09 UTC | |
by mercuryshipz (Acolyte) on Feb 18, 2008 at 22:31 UTC | |
|
Re^5: shell to perl equivalent
by shmem (Chancellor) on Feb 18, 2008 at 21:55 UTC |