add z-every-line script, first attempt

This commit is contained in:
Michael Moon 2011-12-11 08:22:14 +11:00
parent c957c27367
commit 359d4073df

21
post-processing/z-every-line.pl Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/perl
use strict;
my $z = 0;
for (<>) {
if (/Z(\d+(\.\d+)?)/) {
$z = $1;
print;
}
else {
if (!/Z/ && /X/ && /Y/ && $z > 0) {
s/\s*([\r\n\;\(].*)//gs;
print "$_ Z$z $1";
}
else {
print;
}
}
}