-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse_hDD_err.pl
More file actions
executable file
·41 lines (34 loc) · 838 Bytes
/
Copy pathparse_hDD_err.pl
File metadata and controls
executable file
·41 lines (34 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env perl
open(FILEIN, "<hypoDD.log");
open(FILEOUT,">hypo_err.log");
LOGGING: while (<FILEIN>) {
next LOGGING unless m/ITERATION\s+(\d+)|weighted (\w\w) rms/;
chomp;
$number = $1;
if (m/ITERATION/) {
$it = $number;
next LOGGING;
}
elsif (m/cc/) {
($label, $value) = split(/=/);
@ccnums = split(/[\(\)%]/,$value);
$cc = $ccnums[0];
$ccp = $ccnums[1];
if ($ccnums[0] =~ m/\.\d/) { $ccfin = $ctnums[0]; }
next LOGGING;
}
elsif (m/ct/) {
($label, $value) = split(/=/);
@ctnums = split(/[\(\)%]/,$value);
$ct = $ctnums[0];
$ctp = $ctnums[1];
if ($ctnums[0] =~ m/\.\d/) { $ctfin = $ctnums[0]; }
}
else { $it = "OOPS!!";
}
print FILEOUT "$it $cc $ct\n";
#print FILEOUT "$ccp $ctp\n";
}
print "$ccfin $ctfin\n";
close(FILEIN);
close(FILEOUT);