Using Keyboard Maestro variable in ‘Execute a Script in Terminal’ action (plug-in action)

You can paste your KM variables to the second text field (“KM variables”)