Under construction…
– TBD
When you execute a shell script from other apps, like Terminal.app, the shell does NOT have access to the Keyboard Maestro Engine environment, and thus does NOT know anything about Keyboard Maestro Variables.
In order to access Keyboard Maestro Variables in these scripts, you must use a tool like osascript:
osascript -e 'tell application "Keyboard Maestro Engine" to get value of variable "MY_KM_Var"'