zoom/dactest/split.pl
jim 3bcb136417 DAC test stuff
git-svn-id: https://bucket.mit.edu/svn/nilm/zoom@5920 ddd99763-3ecb-0310-9145-efcb8ce7c51f
2008-02-11 21:19:38 +00:00

18 lines
285 B
Perl
Executable File

#!/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;