zoom/dactest/split.pl

18 lines
285 B
Perl
Raw Permalink Normal View History

#!/usr/bin/perl
# split the direct output of the PIC into separate calibration files
$next=0;
while(<>)
{
next if (1 .. /3ADC/);
if (/^---/ or !$next) {
close OUT if $next;
$next++;
open(OUT, ">calib-$next");
}
s/\r\n/\n/;
print OUT if /^[0-9]+/;
}
close OUT;