File: M101

package info (click to toggle)
linuxcnc 1%3A2.9.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 285,604 kB
  • sloc: python: 202,568; ansic: 109,036; cpp: 99,239; tcl: 16,054; xml: 10,631; sh: 10,303; makefile: 1,255; javascript: 138; sql: 72; asm: 15
file content (22 lines) | stat: -rwxr-xr-x 517 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

# M101 in your G-code program will run the Linux commands in this
# shell script "batch" file, passing the P and Q variables as command
# line arguments.

# give the command line arguments descriptive names
P=$1
Q=$2

MCMD=$(readlink -nf $0) ;# canonical file name
MNAME=$(basename $MCMD)

echo
echo "Example for User M-code invocation:"
echo "M-code File: $MCMD"
echo "$MNAME P$P Q$Q"


# if a M1nn command exits with nonzero status,
# the G-code program exits.  So always exit 0.
exit 0 ;# 0 for success