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 .= "'\"" ;
Tags: