use Net::SSH::Perl; my $host = 'host'; my $user = 'username'; my $pass = 'password'; my $string = 'Expression to append'; my $cmd = "echo $string >> /path/to/file"; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd($cmd);
In reply to Re: append an expression to a file on remote host
by fauria
in thread append an expression to a file on remote host
by s_gaurav1091
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |