Closed Travis90x closed 2 years ago
It's likely that the command in the shell command is not getting expanded. meaning wildcard characters have no effect. just execute a shell script and not directly the command.
I can execute a bash with that command correctly with command: sh /home/pi/klipper/scripts/generate-shaper-graph-x.sh scripts here https://github.com/Travis90x/TwoTrees-Sapphire-Plus-SP5/tree/default/Klipper-Firmware/scripts
but in the klipper macro I can't use:
[gcode_shell_command shaper_calibrate_x] command: sh ~/klipper/scripts/generate-shaper-graph-x.sh or command: sh /home/$USER/klipper/scripts/generate-shaper-graph-x.sh
likely because you again use a part in the command which need to be expanded.
~
and $USER
in that case.
Linux Distribution
Debian 11 (bullseye) Kernel: Linux 5.15.27-station Architecture: arm64 Klipper v0.10.0-557 Mainsail v2.2.1
What happened
What did you expect to happen
/tmp/resonances_x_*.csv
the asterisk ->*
have to let to choose all the file like resonances_x_2022_09_02.csv resonances_x_2022_09_01.csvHow to reproduce
[gcode_macro calibrate_x] gcode: RUN_SHELL_COMMAND CMD=shaper_calibrate_x
[gcode_shell_command shaper_calibrate_x] command: ~/klipper/scripts/calibrate_shaper.py /tmp/resonancesx*.csv -o /tmp/shaper_calibrate_x.png timeout: 30. verbose: True
Additional information
The command works fine in terminal ~/klipper/scripts/calibrate_shaper.py /tmp/resonancesx*.csv -o /tmp/shaper_calibrate_x.png