chiark / gitweb /
quacks-ingredients: gcode manipulation
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 19 Feb 2020 23:40:03 +0000 (23:40 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 19 Feb 2020 23:40:03 +0000 (23:40 +0000)
L234

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
quacks-ingredients-make-copy-gcodes

index bcddcf7a1948301ce4fe19525fed462acdace716..35b2d8490463876dc8e9992235b9f5e7b8196fd4 100755 (executable)
@@ -39,17 +39,27 @@ for l in 1 2 3 4 5; do
        ' $g
 done
 
+exec 3>${lhs}234.auto.gcode
+for l in 2 3; do
+       gh
+       perl -pe 's/^/;/ if m/^M104 S0\b/ || (m/^M84/..0)' $g >&3
+done
+for l in 4; do
+       gh
+       cat $g >&3
+done
+
 umount /media/sd >/dev/null 2>&1 ||:
 mount /media/sd
 
-for l in 1 2 3 4 5; do
+for l in 1 2 3 4 5 234; do
        cp $g $h
 done
 
 umount /media/sd
 mount /media/sd
 
-for l in 1 2 3 4 5; do
+for l in 1 2 3 4 5 234; do
        gh
        cmp $g $h
        ls -l $h