Help for this page

Select Code to Download


  1. or download this
    $ssh->system("nohup ./script.pl &");
    
  2. or download this
    # Read File on remote machine
    ( $DATA, $ERR ) = $SSH->capture2( "cat <file on remote machine" );
    
    # Write/Append $DATA to loca file
    <write data to loca file>
    
  3. or download this
    $ssh->system({stdout_file => ['>>', $local_file]},
                 cat => $remote_file).
    
  4. or download this
    my $PROC = $SSH->capture( "ps aux | grep <process_name> | grep -v grep
    + | wc -l | sed 's/  *//'" );
    if( $PROC == 0 ) {...