Help for this page

Select Code to Download


  1. or download this
    sub text_to_shell_lit(_) {
       return $_[0] if $_[0] =~ /^[a-zA-Z0-9_\-]+\z/;
    ...
    
    my $ssh_cmd = join ' ', map text_to_shell_lit,
       ssh => 'hostname', "$echo_cmd | $passwd_cmd";
    
  2. or download this
    ssh hostname 'echo '\''test$ing'\'' | passwd -- bob'