This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
action:Execute_a_Shell_Script [2019/11/25 16:53] JMichaelTX |
action:Execute_a_Shell_Script [2024/11/19 03:38] (current) peternlewis |
||
---|---|---|---|
Line 7: | Line 7: | ||
* It is best to always specify the language using the `#!` at the front of the script. | * It is best to always specify the language using the `#!` at the front of the script. | ||
* The script is executed with the `sh` shell, so if you want to use another language, or use any special kinds of shell-specific syntax, then you should specify the language. | * The script is executed with the `sh` shell, so if you want to use another language, or use any special kinds of shell-specific syntax, then you should specify the language. | ||
+ | * The shell is a non-login shell, so configuration files (like .bashrc) will not be run - in particular, this means you will not have much in the PATH (see [[#Path_in_Shell_Scripts|below]] for more information). | ||
* For more details and examples, see [[https://forum.keyboardmaestro.com/t/impact-of-macos-catalina-defaulting-to-unix-shell-using-zsh/15503/12?u=jmichaeltx|How to Use Shebang at Top of Shell Script]] | * For more details and examples, see [[https://forum.keyboardmaestro.com/t/impact-of-macos-catalina-defaulting-to-unix-shell-using-zsh/15503/12?u=jmichaeltx|How to Use Shebang at Top of Shell Script]] | ||
Line 17: | Line 18: | ||
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. | ||
+ | Keyboard Maestro sets the environment variables for the script to include all your variables, using a prefix of `KMVAR_` and your variable name with spaces changed in to underscores (‗). For example, your Keyboard Maestro “File Name” variable will be available as the environment variable `KMVAR_File_Name`. | ||
+ | Keyboard Maestro also provides (v10.0+) a number of environment variables that contain information about the executing macro. These include: | ||
+ | |||
+ | ^environment variable^meaning^ | ||
+ | |`KMINFO_MacroName`|The name of the parent executing macro| | ||
+ | |`KMINFO_MacroUUID`|The UUID of the parent executing macro| | ||
+ | |`KMINFO_MacroGroupName`|The name of the macro group containing the parent executing macro| | ||
+ | |`KMINFO_MacroGroupUUID`|The UUID of the macro group containing the parent executing macro| | ||
+ | |`KMINFO_ThisMacroName`|The name of the executing macro| | ||
+ | |`KMINFO_ThisMacroUUID`|The UUID of the executing macro| | ||
+ | |`KMINFO_ThisMacroGroupName`|The name of the macro group containing the executing macro| | ||
+ | |`KMINFO_ThisMacroGroupUUID`|The UUID of the macro group containing the executing macro| | ||
+ | |`KMINFO_TriggerTime`|The [[/unixtime|unixtime]] the parent macro started executing| | ||
+ | |`KMINFO_TriggerBase`|The type of the trigger that started the parent macro| | ||
+ | |`KMINFO_Trigger`|The trigger description of the trigger that started the parent macro| | ||
+ | |`KMINFO_TriggerValue`|the value associated with how the parent macro was triggered| | ||
+ | |`KMINFO_ActionResult`|The success or failure of the immediate past action| | ||
+ | |`KMINFO_LastWindowID`|The window ID of the most recently displayed Keyboard Maestro Engine window| | ||
+ | |`KMINFO_PromptWithListText`|The text typed in the most recently executed [[action:Prompt_With_List|Prompt With List]] action| | ||
+ | |`KMINFO_PasteByNameText`|The text typed in the most recently executed [[action:Paste_by_Name|Paste by Name]] action| | ||
==== Using Keyboard Maestro Variables ==== | ==== Using Keyboard Maestro Variables ==== | ||
- | === Most Languages like bash, perl, ruby === | + | Keyboard Maestro variables are included in the environment of the script, with the prefix `KMVAR_` and spaces in the name replaced with underscores (‗), |
- | In your script, use this format: `$KMVAR_[variable_name]` | + | By default, all variables are included, but you can select No Variables, or specific variables as desired using the popup menu next to the script (v11.0+). |
- | where //[variable‗name]// is the name of your Keyboard Maestro Variable, but with spaces in the name replaced with underscores (`‗`). | + | === Most Shell Languages like bash === |
- | For example: `File Name` would be formatted as `$KMVAR‗File‗Name`. | + | In your script, use this format $KMVAR‗*VARIABLE‗NAME* where *VARIABLE‗NAME* is the name of your Keyboard Maestro Variable, but with spaces in the name replaced with underscores (‗). |
+ | |||
+ | For example: `File Name` would be formatted as $KMVAR‗File‗Name. | ||
If your variable already has underscores, you can use it as is. | If your variable already has underscores, you can use it as is. | ||
Line 33: | Line 56: | ||
{{:action:km7-shell-script.png?nolink|}} | {{:action:km7-shell-script.png?nolink|}} | ||
- | ==== Python ==== | + | Keep in mind that $KMVAR‗*VARIABLE‗NAME* is a shell environment variable, and this format is directly accessible to `bash`, `sh`, `zsh`, etc. Other languages may need a different method to read the shell environment variables. |
- | Accessing Keyboard Maestro Variables in Python is somewhat different. Here is an example: | + | Note that you can only read these environment variables. You cannot write to them (or more accurately, you can write to them but that will not change the Keyboard Maestro variables that they were created from). |
+ | |||
+ | ==== Perl==== | ||
+ | |||
+ | ```perl | ||
+ | my $fileName = $ENV{KMVAR_File_Name}; | ||
+ | ``` | ||
+ | |||
+ | ==== Python ==== | ||
```python | ```python | ||
#!/usr/bin/env python | #!/usr/bin/env python | ||
+ | |||
import os | import os | ||
- | print os.environ['KMVAR_local_DataStr'].count(os.environ['KMVAR_local_CharToCount']) | + | print os.environ['KMVAR_File_Name'] |
``` | ``` | ||
See the [[#Forum|Forum]] section below for more Python examples. | See the [[#Forum|Forum]] section below for more Python examples. | ||
- | |||
- | Note that you can only read these environment variables. You cannot write to them (or more accurately, you can write to them but that will not change the Keyboard Maestro variables that they were created from). | ||
==== awk ==== | ==== awk ==== | ||
- | [Using shell variables in awk](https://stackoverflow.com/a/15787068/915019) is also different than in most other shell languages. You need to pass the environment variable as parameter to the -v flag. | + | [Using shell variables in awk](https://stackoverflow.com/a/15787068/915019) is also different than in most other shell languages. You need to pass the shell variable as parameter to the -v flag. |
Some examples: | Some examples: | ||
```bash | ```bash | ||
- | # EXAMPLE 1 | + | awk -v awkVariable="$KMVAR_File_Name" 'BEGIN {print "The value of VAR is: " awkVariable}' |
- | + | ||
- | echo | awk -v my_var=4 '{print "My var is " my_var}' | + | |
- | #-->My var is 4 | + | |
- | + | ||
- | # EXAMPLE 2 | + | |
- | + | ||
- | VAR=3 | + | |
- | echo | awk -v env_var="$VAR" '{print "The value of VAR is " env_var}' | + | |
- | #-->The value of VAR is 3 | + | |
- | + | ||
- | # USING KM VARIABLES with awk | + | |
- | + | ||
- | echo | awk -v env_var="$KMVAR_My_KM_Variable" '{print "The value of My_KM_Variable is: \""env_var"\""}' | + | |
- | #-->The value of My_KM_Variable is: "Text from KM var" | + | |
``` | ``` | ||
- | |||
- | For a KM Macro that shows this, see:\\ | ||
- | **[MACRO: Using KM Variables with Bash awk [Example]](https://forum.keyboardmaestro.com/t/passing-argument-to-awk/16169/3)** | ||
- | |||
==== Passing Paths in Variables ==== | ==== Passing Paths in Variables ==== | ||
If you are passing a file/folder path in a Keyboard Maestro Variable, then it is best to put the Variable reference in double quotes so that spaces in the path will work, like this: | If you are passing a file/folder path in a Keyboard Maestro Variable, then it is best to put the Variable reference in double quotes so that spaces in the path will work, like this: | ||
+ | |||
```bash | ```bash | ||
cat "$KMVAR_File_Path" | cat "$KMVAR_File_Path" | ||
Line 83: | Line 96: | ||
**Consider These Guidelines** | **Consider These Guidelines** | ||
- | * This must be a full path. **If the path starts with a tilde (~)**, then you must first convert it to a full path using the [[action:Filter | Filter, Expand tilde (~) paths]] Action BEFORE the Execute Shell Script Action. | + | * This must be a full path. **If the path starts with a tilde (~)**, then you must first convert it to a full path using the [[action:Filter | Filter, Expand tilde (~) paths]] action **before** the Execute Shell Script action. |
* Like all Bash variables, the Keyboard Maestro Variable must _not_ be between single quotes (`'`) in order for the variable to be expanded to / replaced by its value. So, for example, **this will _not_ work**: | * Like all Bash variables, the Keyboard Maestro Variable must _not_ be between single quotes (`'`) in order for the variable to be expanded to / replaced by its value. So, for example, **this will _not_ work**: | ||
```bash | ```bash | ||
# 🚫 Does NOT Work | # 🚫 Does NOT Work | ||
- | /usr/local/bin/emacsclient -e '(w3m-browse-url "$KMVAR_SafariURL")' | + | echo 'The variable is "$KMVAR_File_Name"' |
``` | ``` | ||
+ | |||
because although the Variable is between double-quotes, it is in a string that is between single-quotes. | because although the Variable is between double-quotes, it is in a string that is between single-quotes. | ||
Line 96: | Line 110: | ||
```bash | ```bash | ||
# ✅ This WORKS | # ✅ This WORKS | ||
- | /usr/local/bin/emacsclient -e '(w3m-browse-url "'"$KMVAR_SafariURL"'")' | + | echo 'The variable is "'"$KMVAR_File_Name"'"' |
``` | ``` | ||
+ | |||
One key Bash feature that makes this work is that when two quoted strings are adjacent, they will be concatenated. So after the Variable is expanded, the command string might look like this: | One key Bash feature that makes this work is that when two quoted strings are adjacent, they will be concatenated. So after the Variable is expanded, the command string might look like this: | ||
```bash | ```bash | ||
- | /usr/local/bin/emacsclient -e '(w3m-browse-url "https://www.apple.com")' | + | echo 'The variable is "Test.txt"' |
``` | ``` | ||
- | |||
- | For more info, see these discussions in the Keyboard Maestro Forum: | ||
- | * [[https://forum.keyboardmaestro.com/t/png-metadata-comment/6375/29| How To Quote Paths by @ccstone]]. | ||
- | * [[https://forum.keyboardmaestro.com/t/trouble-expanding-variable-in-shell-script/13664/2?u=jmichaeltx | Trouble Expanding Variable in Shell Script by @PeterNLewis]] | ||
==== UTF-8 and Non-ASCII Characters ==== | ==== UTF-8 and Non-ASCII Characters ==== | ||
Line 120: | Line 131: | ||
* Trim Results — removes white space from the start and end of the scripts results. | * Trim Results — removes white space from the start and end of the scripts results. | ||
* Include Errors — include stdout and stderr results from the script. | * Include Errors — include stdout and stderr results from the script. | ||
- | |||
==== Output of Results ==== | ==== Output of Results ==== | ||
Line 126: | Line 136: | ||
The results of a shell script can be: | The results of a shell script can be: | ||
- | * Ignored. | + | {{page>include:ScriptOutput#}} |
- | * Displayed in a floating window. | + | |
- | * Displayed briefly in a Notification. | + | If the output is going to a clipboard or a file, the downloaded data can be an image (v11.0+). |
- | * Displayed large across the screen. | + | |
- | * Typed in to the current selection. | + | If you want to return multiple values from a script, then you can use AppleScript (via `osascript`) to [[manual:Scripting#AppleScript|set Keyboard Maestro variables]]. |
- | * Pasted in to the current selection. | + | |
- | * Saved to a variable. | + | |
- | * Appended to a variable (v9.0+). | + | |
- | * Saved to the system or a Named Clipboard. | + | |
- | * 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 170: | Line 174: | ||
It is bash that has processed the variable substitution for $KMVAR_witchPref, split the line in to seven parts, processed the backslash in "Application\ Support" and then executed the defaults tool with the seven parts as arguments (the command itself is the 0th argument, normally mostly ignored by tools). | It is bash that has processed the variable substitution for $KMVAR_witchPref, split the line in to seven parts, processed the backslash in "Application\ Support" and then executed the defaults tool with the seven parts as arguments (the command itself is the 0th argument, normally mostly ignored by tools). | ||
- | So the problem is that the word-breaking, variable substitution, de-quoting and de-backslash is all happening at as the line is processed by bash, after which you are left with quotes from within variable substitution, but they no longer have any meaning, they are just characters. | + | So the problem is that the word-breaking, variable substitution, de-quoting and de-backslash is all happening as the line is processed by bash, after which you are left with quotes from within variable substitution, but they no longer have any meaning, they are just characters. |
So variables that are meant to be a single parameter should be surrounded by double quotes in the line, but not contain quotes in the variable, and generally you do not want to pass multiple parameters within a single parameter. So instead, perhaps set one variable to the setting name, and one variable to the type and one variable to the value, and then use a command like this: | So variables that are meant to be a single parameter should be surrounded by double quotes in the line, but not contain quotes in the variable, and generally you do not want to pass multiple parameters within a single parameter. So instead, perhaps set one variable to the setting name, and one variable to the type and one variable to the value, and then use a command like this: | ||
Line 178: | Line 182: | ||
``` | ``` | ||
- | Now a further complication happens when you want to sent a string containing double quotes and variables to a parameter. For example, perhaps you want a command like this: | + | Now a further complication happens when you want to send a string containing double quotes and variables to a parameter. For example, perhaps you want a command like this: |
```bash | ```bash | ||
Line 210: | Line 214: | ||
* `")` - single quoted string | * `")` - single quoted string | ||
+ | For the reverse problem, where you have a variable that contains multiple parameters, note that you cannot use quotes within a variable - by the time the shell is expanding variables, it has already processed quotes and will not do so again so quotes will just be regular characters passed to the target command and almost certainly result in errors. If possible, use seperate variables for seperate parameters, but if you cannot do that (for example you have a list of paths), store them as seperate lines in a variable (without any quoting or backslashes) and use a command like: | ||
+ | |||
+ | ```bash | ||
+ | echo "$KMVAR_files" | tr '\r\n' '\0' | xargs -0 ls -l | ||
+ | ``` | ||
+ | |||
+ | The tr command will replace `\r` or `\n` line endings with a nul character, and the `xargs -0` command will read that, split the arguments at the nul character, and pass them to the specified command (in this case `ls -l`. Note that xargs has a limit to the number of arguments it will pass, so for large numbers of arguments it may run the command multiple times with subsets of the arguments - read the `xargs` man page for more details. | ||
===== Path in Shell Scripts ===== | ===== Path in Shell Scripts ===== | ||
- | **In essence, the _default_ path in a Keyboard Maestro Execute Shell Script is the base path for the system:** | + | In essence, the _default_ path in a Keyboard Maestro Execute Shell Script is the base path for the system: |
/usr/bin:/bin:/usr/sbin:/sbin | /usr/bin:/bin:/usr/sbin:/sbin | ||
- | that is the script will search for tools in the `/usr/bin` directory, then in the `/bin` directory, then `/usr/sbin` and finally `/sbin`. Only tools installed by the system will be in these directories - any tools you have installed will almost certainly be elsewhere and so not found by default because: | + | That is the script will search for tools in the `/usr/bin` directory, then in the `/bin` directory, then `/usr/sbin` and finally `/sbin`. Only tools installed by the system will be in these directories - any tools you have installed will almost certainly be elsewhere and so not found by default because: |
- | * **shell scripts are executed in non-interactive mode** (see the INVOCATION section of the sh man page), the **only** path preset by default is the system path. | + | * Shell scripts are executed in non-interactive mode (see the INVOCATION section of the sh man page), the **only** path preset by default is the system path. |
- | * **Thus, your tools or files may not be automatically accessible.** | + | * Thus, your tools or files may not be automatically accessible. |
* The `$PATH` environment variable you may have set in Terminal is **not** used. | * The `$PATH` environment variable you may have set in Terminal is **not** used. | ||
- | * None of your profile scripts (like *~/.profile*) will be executed. | + | * None of your profile scripts (like `~/.profile`) will be executed. |
* Custom environment variable settings will not be applied, including any settings for tool-specific environment variables like PERL5LIB. | * Custom environment variable settings will not be applied, including any settings for tool-specific environment variables like PERL5LIB. | ||
- | **How To Set a Path** | + | Generally, the best thing to do is to use full paths when referring to tools, such as `/usr/local/bin/perl`, however some tools may access sub-tools that they cannot find without the PATH (or other environment variables) being set. |
- | * If you need access to tools (executables) or files that you installed (not part of the system installation),\\ **You will need to do one of the following:**\\ | + | |
- | * **Use an explicit, full path** to the tool or file.\\ See [[#Passing_Paths_in_Variables|Passing Paths in Variables]] in the above section.\\ OR | + | |
- | * **Set the `$PATH` environment variable within each Execute Shell Script action**.\\ OR | + | |
- | * **Set `ENV_PATH`** (the Keyboard Maestro Path Variable) **prior to the Execute Shell Script Action.** | + | |
- | * The path defined in this Variable will automatically apply to every Execute Shell Script, without need for further reference. It will work just like your `$PATH` works in the Terminal app. | + | |
- | * You can set this Variable manually in the [[manual:Windows#Example|Variable Preferences Panel]] of the _Keyboard Maestro App Preferences_. | + | |
- | * Once the `ENV_PATH` Variable is set, it will remain in your Keyboard Maestro Variable set (until/unless you delete it), available to every Execute Shell Script Action that you might use in the future. So you don't need to set it in every Macro. | + | |
- | * If your tool requires other environment variables to be set you can set them as well by creating an appropriate Keyboard Maestro variable with `ENV_` at the front. | + | |
- | * For example, if you want to use [[https://www.perl.org/ | Perl]] with a custom library search path in a Execute Shell Script action, you can also create a Keyboard Maestro Variable `ENV_PERL5LIB` that will set the the [[http://perldoc.perl.org/perlrun.html#ENVIRONMENT|PERL5LIB environment variable]] for each Execute Shell Script. | + | |
- | **Setting the ENV‗PATH Keyboard Maestro Variable** | + | If you need access to tools (executables) or files that you installed (not part of the system installation), **you will need to do one of the following:** |
+ | * Use an explicit, full path to the tool or file. See [[#Passing_Paths_in_Variables|Passing Paths in Variables]] in the above section. **or** | ||
+ | * Set the `$PATH` environment variable within each Execute Shell Script action. **or** | ||
+ | * Set `ENV_PATH` Keyboard Maestro variable prior to the Execute Shell Script Action. | ||
- | A shell script path that will work for many users is: | + | Any Keyboard Maestro variable that starts with `ENV_` will automatically be set as the as the corresponding environment variable (without the usual `KMVAR_` prefix). So if you set your path in the `ENV_PATH` Keyboard Maestro variable, the `PATH` environment variable will be set from it. |
- | /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin | + | You can set this Variable manually in the [[manual:Preferences#Variables_Preferences|Variable Preferences Panel]] in Keyboard Maestro. Once the `ENV_PATH` variable is set, it will remain in your Keyboard Maestro variable until/unless you delete it, and remain available to every Execute a Shell Script action that you might use in the future. So you don’t need to set it in every Macro. |
- | Of course, if you have tools or files you installed elsewhere, then you would need to include the path to those in this path statement, IF you plan to use any of those tools/files in a Execute Shell Script Action. | + | If your tool requires other environment variables to be set you can set them as well by creating an appropriate Keyboard Maestro variable with `ENV_` at the front. |
- | You can create the `ENV_PATH` Variable one time using the [[manual:Windows#Example|Variable Preferences Pane]] of the _Keyboard Maestro Preferences_. | + | For example, if you want to use [[https://www.perl.org/ | Perl]] with a custom library search path in the Execute a Shell Script action, you can also create a Keyboard Maestro variable `ENV_PERL5LIB` that will set the [[http://perldoc.perl.org/perlrun.html#ENVIRONMENT|PERL5LIB environment variable]]. |
- | * Add a variable named `ENV_PATH` and set its value. | + | |
- | * Once set, it will remain unchanged until you change or delete it. | + | |
- | {{:action:env_path-var-preferences-km-7.3.png?nolink|}} | + | (!) Note that if in the action you exclude the ENV_ variables (including potentially the ENV_PATH) from being included in the environment (eg by selecting //Include No Variables//), this will result it them not being included and thus not setting the corresponding environment variables. |
+ | |||
+ | ===== Working Directory ===== | ||
+ | |||
+ | The working directory for any executed scripts will be set from the Keyboard Maestro `ENV_PWD` directory (v10.0+), or default to the root directory (`/`). | ||
- | For a good discussion about this see: | ||
- | * [KM can"t find shell commands ](https://forum.keyboardmaestro.com/t/km-cant-find-shell-commands/5430) | ||
- | * [[https://forum.keyboardmaestro.com/t/png-metadata-comment/6375/16| Post by @ccstone]] | ||
===== Execute Script From Other Apps ===== | ===== Execute Script From Other Apps ===== | ||
- | 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 it does NOT know anything about Keyboard Maestro Variables. | + | 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 it does **not** know anything about Keyboard Maestro Variables. |
In order to access Keyboard Maestro Variables in these scripts, you must use a tool like [[https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/osascript.1.html|osascript]]. | In order to access Keyboard Maestro Variables in these scripts, you must use a tool like [[https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/osascript.1.html|osascript]]. | ||
- | (!) Note that you do NOT need to replace spaces with underscores in your Variable name in this case, since you are ultimately using AppleScript in the Shell Script. | + | Here is a simple example to **get** a variable: |
- | + | ||
- | Here is a simple example that works with Keyboard Maestro Ver 6+ to **get** a variable: | + | |
- | <code> | + | |
- | osascript -e 'tell application "Keyboard Maestro Engine" to get value of variable "My KM Var"' | + | |
- | </code> | + | |
- | + | ||
- | If you are using Keyboard Maestro 7.1+ you can use the new simpler command to **get** a variable: | + | |
<code> | <code> | ||
osascript -e 'tell application "Keyboard Maestro Engine" to getvariable "My KM Var"' | osascript -e 'tell application "Keyboard Maestro Engine" to getvariable "My KM Var"' | ||
</code> | </code> | ||
- | To **set** a variable (and create if needed) with Ver 7.1+ you can use this: | + | (!) Note that you do **not** replace spaces with underscores in your variable name in this case, since you are ultimately using AppleScript in the Shell Script. |
+ | |||
+ | To **set** a variable (and create if needed) you can use this: | ||
<code> | <code> | ||
osascript -e 'tell application "Keyboard Maestro Engine" to setvariable "My KM Var" to "Some new value"' | osascript -e 'tell application "Keyboard Maestro Engine" to setvariable "My KM Var" to "Some new value"' | ||
Line 300: | Line 299: | ||
=== Actions === | === Actions === | ||
+ | * [[action:Execute_a_Swift_Script|Execute a Swift Script]] | ||
* [[action:Execute an AppleScript|Execute an AppleScript]] | * [[action:Execute an AppleScript|Execute an AppleScript]] | ||
* [[action:Execute an Automator Workflow|Execute an Automator Workflow]] | * [[action:Execute an Automator Workflow|Execute an Automator Workflow]] | ||
Line 327: | Line 327: | ||
- [[https://forum.keyboardmaestro.com/t/using-installed-shell-tools-from-km/4341/10|Using installed shell tools from KM]] | - [[https://forum.keyboardmaestro.com/t/using-installed-shell-tools-from-km/4341/10|Using installed shell tools from KM]] | ||
- [[https://forum.keyboardmaestro.com/t/feature-request-execute-python-script/4927/6|[feature request] execute python script]] | - [[https://forum.keyboardmaestro.com/t/feature-request-execute-python-script/4927/6|[feature request] execute python script]] | ||
+ | For more info, see these discussions in the Keyboard Maestro Forum: | ||
+ | - [[https://forum.keyboardmaestro.com/t/png-metadata-comment/6375/29| How To Quote Paths by @ccstone]]. | ||
+ | - [[https://forum.keyboardmaestro.com/t/trouble-expanding-variable-in-shell-script/13664/2?u=jmichaeltx | Trouble Expanding Variable in Shell Script by @PeterNLewis]] | ||
+ | - [[https://forum.keyboardmaestro.com/t/km-cant-find-shell-commands/5430| KM can’t find shell commands]] | ||
+ | - [[https://forum.keyboardmaestro.com/t/png-metadata-comment/6375/16| Post by @ccstone]] | ||
- [[https://forum.keyboardmaestro.com/tags/shellscript|Keyboard Maestro Forum topics about Shell Script]] | - [[https://forum.keyboardmaestro.com/tags/shellscript|Keyboard Maestro Forum topics about Shell Script]] | ||
**Keywords:** Quote String, Bash, Shell Scripting | **Keywords:** Quote String, Bash, Shell Scripting |