I’ve got a pretty messy perl script (I’m not a Perl guru) which is this one:
perl -ane '($h,$m,$s) = split /:/, $F[0];
$pid = $F[1];
$args = $F[2]." ".$F[3]." ".$F[4]." ".$F[5]." ".$F[6]." ".$F[7]." ".$F[8]." ".$F[9]." ".$F[10]." ".$F[11]." ".$F[12]." ".$F[13];
if(($h == 1 && $m > 30) || ($h > 1)) {
print "$h :: $m $kb $pid\nArguments:\n$args\n\n "; kill 9, $pid }'
I’m searching for a way, instead of having all these concatenations for $arg, to say something like $arg=$F[2-end]
I’d love any help on that 🙂
Thanks!
You can do this in bash as well: