Skip to content

Instantly share code, notes, and snippets.

@T-rex2017
Created March 7, 2021 15:39
Show Gist options
  • Save T-rex2017/568c521f8b236b7fe0d9eb515f2dfa6a to your computer and use it in GitHub Desktop.
Save T-rex2017/568c521f8b236b7fe0d9eb515f2dfa6a to your computer and use it in GitHub Desktop.
#!/bin/sh
echo "input file : "$1
echo "G0 S0 >> G0 Z4.5"
sed -i 's/G0 S0/G0 Z4.5/g' $1
echo "G0 S255 >> G0 Z3.9"
sed -i 's/G0 S255/G0 Z3.9/g' $1
echo " " >> $1
echo "G0 Z10.0 ;"
echo "G0 Z10.0 ;" >> $1
echo "G0 X0.0 Y160.0 ;"
echo "G0 X0.0 Y160.0 ;" >> $1
echo "M84 X Y Z E ;"
echo "M84 X Y Z E ;" >> $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment