I'd seen this question before and frankly, I didn't quite understand the answer, but I went ahead and fixed it myself in a pretty simple way. I just used "osascript -e 'script-UUID' " and it worked fine.
Suddenly later that session, I ran it from the command line and got
syntax error: Expected end of line but found unknown token. (-2741)
Then I used osascript -e "tell application 'Keyboard Maestro Engine'\n do script '34007B18-D3C6-4 2F8-BEC6-9FBFCB11EF7B' \nend tell"
Now, given that someone supposedly answered this issue before and got something working, could you please give me some example of how I would call a KBM macro from BASH ????
I'm not sure where the cult of the one-liner started,
( misinterpretation of phrases like it's just a one liner ? )
but it's never kind to give people the impression that
some kind of slightly mysterious credit attaches to
expressing things in a single line ...
(If Lincoln had done that to the Gettysburg address we would never have heard of it, and even if he had somehow managed not to lose or tangle the very long piece of string or sellotape on which it was written, he would have run out of breath before getting half way.)
I found using APL back at IBM that time was wasted in interpreters reading each line from the file before execution, and making a finished program into a one-liner made it faster. I'm not sure how important that is these days with faster drives, memory and machines and with BASH.
I just think less computation means less electricity consumption. Therefore, I try to reduce the amount of computation if necessary, including using shorter variable names. But I don't know whether or how it has any effects at all.
For KM, I'm also debating whether or how much comments to put in a macro, because it increases the size of the macro file.