This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
action:Execute_a_Shell_Script [2019/07/01 02:46] peternlewis [Execute a Shell Script] |
action:Execute_a_Shell_Script [2019/10/07 04:37] peternlewis [Execute a Shell Script] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Execute a Shell Script ====== | ====== Execute a Shell Script ====== | ||
- | The //Execute a Shell Script// action executes a specified shell script, either from a file or from the script embedded in the action. | + | The //Execute a Shell Script// action executes a specified shell script using `/bin/sh`, either from a file or from the script embedded in the action. |
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. | ||
Line 10: | Line 10: | ||
If the script fails, the action will fail (v9.0+), potentially aborting the macro. | If the script fails, the action will fail (v9.0+), potentially aborting the macro. | ||
+ | |||
+ | If you want to use another language, or use any special kinds of shell-specific syntax, then you should specify the language using the `#!` at the front of the script. | ||
==== Using Keyboard Maestro Variables ==== | ==== Using Keyboard Maestro Variables ==== | ||
Line 98: | Line 100: | ||
* Pasted in to the current selection. | * Pasted in to the current selection. | ||
* Saved to a variable. | * Saved to a variable. | ||
+ | * Appended to a variable (v9.0+). | ||
* Saved to the system or a Named Clipboard. | * Saved to the system or a Named Clipboard. | ||
* Asynchronously ignored — the action runs while the macro continues on. | * Asynchronously ignored — the action runs while the macro continues on. |