User Tools

Site Tools


action:Execute_a_Shell_Script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
action:Execute_a_Shell_Script [2017/03/14 04:37]
peternlewis [Using Keyboard Maestro Variables]
action:Execute_a_Shell_Script [2017/09/06 23:43]
peternlewis [How To Use]
Line 8: Line 8:
  
 To execute the script from an external file, choose the "​Execute Script File" in the choices for script location.\\ To execute the script from an external file, choose the "​Execute Script File" in the choices for script location.\\
-{{:action:km-7.3-execute-shell-script.png?​nolink|}}+ 
 +{{:​action:​execute-shell-script.png?​nolink&693|}} 
 ==== Using Keyboard Maestro Variables ==== ==== Using Keyboard Maestro Variables ====
  
Line 50: Line 52:
   * Displayed in a floating window.   * Displayed in a floating window.
   * Displayed briefly in a Notification.   * Displayed briefly in a Notification.
 +  * Displayed large across the screen.
   * Typed in to the current selection.   * Typed in to the current selection.
   * Pasted in to the current selection.   * Pasted in to the current selection.
Line 56: Line 59:
   * Asynchronously ignored — the action runs while the macro continues on.   * Asynchronously ignored — the action runs while the macro continues on.
  
 +If you want to return multiple values from a script, then you can either use AppleScript (via `osascript`) to [[manual:​Scripting#​AppleScript|set Keyboard Maestro variables]].
 ===== Examples ===== ===== Examples =====
  
Line 65: Line 68:
 ===== Quoting Strings ===== ===== Quoting Strings =====
  
-Proper quoting of strings in a Shell Script is often a challenge.\\+Proper quoting of strings in a Shell Script is often a challenge. 
 For a discussion on how to quote a string, see this [[https://​forum.keyboardmaestro.com/​t/​having-trouble-with-quotes-and-shell-variables/​6236/​9?​u=jmichaeltx | Keyboard Maestro Forum post by @PeterNLewis]]. For a discussion on how to quote a string, see this [[https://​forum.keyboardmaestro.com/​t/​having-trouble-with-quotes-and-shell-variables/​6236/​9?​u=jmichaeltx | Keyboard Maestro Forum post by @PeterNLewis]].
  
action/Execute_a_Shell_Script.txt · Last modified: 2023/09/22 04:39 by peternlewis