Help for this page

Select Code to Download


  1. or download this
      system($cmd);
    
  2. or download this
      /usr/bin/rsh somehost -l someuser "ls -l" >> /tmp/someFile
    
  3. or download this
      my $cmd = qq[$rsh $host -l $id "$command" >> $someFile];
      system($cmd);
    
  4. or download this
      my $output = IO::File->new("|tee $someFile");
      local *STDOUT;
      open STDOUT, '>&', $output;
    
  5. or download this
      my $cmd = qq[$rsh $host -l $id "$command"];
      system($cmd);
    
  6. or download this
      my @cmd = ($rsh, $host, '-l', $id, $command);
      print "Executing: ", join(' ', @cmd), "\n";
      system(@cmd)