November 2019

S M T W T F S
      12
34 5 678 9
10111213141516
17181920212223
24252627282930

Page Summary

Style Credit

Expand Cut Tags

No cut tags

March 1st, 2007

dil: (Default)
Thursday, March 1st, 2007 05:38 pm
my $cmd = "$SSH $USER\@$log->{'host'} "
    ."\"perl -e '\\\$F=\\\"$log->{'file'}\\\"; \\\$M=(stat(\\\$F))[9]; "
    ."if(!defined(\\\$M)){print \\\"\\\$F not found\\n\\\";} "
    ."elsif(\\\$M < $log->{'lastrun'}){print \\\"\\\$F is stale\\n\\\";} "
    ;
  if(defined($log->{'regexp'})) {
    $cmd .= " else {system(\\\"grep '\\\"'\\\"'$log->{'regexp'}'\\\"'\\\"' \\\$F\\\");} ";
  }
  $cmd .= "'\"" ;