Rafael Skodlar <ra...@...> writes:
> bash can be troubleshot at least two ways:
> - run with 'sh -x yourscript' or
> - use echo to show what it's supposed to happen
>
> I created script to include you commands as well as what I believe it
> should be:
>
> cat /tmp/test.sh
> #!/bin/bash
> echo program -f 1$ -p 2$
> echo program -f $1 -p $2
> echo "====="
> echo program -f '$1:' [$1] -p '$2:' [$2]
>
> now run the following line:
> sh /tmp/test.sh 4 5
> program -f 1$ -p 2$
> program -f 4 -p 5
> =====
> program -f $1: [4] -p $2: [5]
>
> Last four lines are the result of the script. You need to change 1$ to
> $1. 'exit 0' is not needed.
>
The script works good, but when I trying to entering command M101 P4 Q5 in MDI
prompt, nothing happens. Looks like that EMC v2.3.5 don't runs the M100 script?
file M100:
#!/bin/bash
$1 $2 > mylog.log
MDI: M100 P4 Q5
cat mylog.log
{empty}
but if from command line:
~/emc2/nc_files/sh -x M100 4 5
cat mylog.log
4 5
------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users