Passing a variable and execute shell script

Posted on
Sun Feb 16, 2020 8:30 am
davinci offline

Passing a variable and execute shell script

I have a shell command that I want to run by using a variable from Indigo.

Python
Code: Select all
command = indigo.variables["command"].value
RUN SHELL SCRIPT AND PASS COMMAND
indigo.variable.updateValue("command", "")


Shell
Code: Select all
 app -option command


How can I do this?

Posted on
Sun Feb 16, 2020 8:51 am
davinci offline

Re: Passing a variable and execute shell script

For future reference:

Python
Code: Select all
subprocess.check_call(['/path/to/script/app', var_indigo])

Shell
Code: Select all
#!/usr/bin/env bash
command $1


$1 equals var_indigo

Posted on
Mon Feb 17, 2020 10:43 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Passing a variable and execute shell script

Or just use the Run Shell Script action... ;)

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 7 guests