diff --git a/utils/post-processing/strip-toolchange.pl b/utils/post-processing/strip-toolchange.pl new file mode 100644 index 000000000..8ed227dea --- /dev/null +++ b/utils/post-processing/strip-toolchange.pl @@ -0,0 +1,15 @@ +#!/usr/bin/perl -i +# +# Remove all toolchange commands (and T# arguments) from gcode. + +use strict; +use warnings; + +# read stdin and any/all files passed as parameters one line at a time +while (<>) { + if (not /^T[0-9]/) { + s/\s*(T[0-9])//; + print; + } else { + } +}