Running shell script without Terminal window

Posted on
Fri Aug 27, 2021 8:26 am
davinci offline

Running shell script without Terminal window

What is the best way to run a shell script?

Right now I use open file to run it, but it always opens a Terminal window. I prefer not to show that window.
Ist this possible and how?

Posted on
Fri Aug 27, 2021 8:54 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Running shell script without Terminal window

Use the Run Shell Script action.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Aug 27, 2021 9:04 am
davinci offline

Re: Running shell script without Terminal window

Makes sense :)

I just ran into the next question.

How can I see if it is still running and how can I interrupt this shell script from Indigo?

Posted on
Fri Aug 27, 2021 10:17 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Running shell script without Terminal window

Using this action, you can't. In fact, building the capability to kill a shell script that you start is going to be a non-trivial exercise. You might want to reconsider the architecture of your solution if that's really a requirement - see if there's a better way of solving the problem.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Aug 27, 2021 2:31 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Running shell script without Terminal window

To kill a command you started with “run shell script”:
Code: Select all
ps ax | grep <command name>

That will give you the process id (pid), then just kill it.
If you will be doing this often, then have your script or program save its pid somewhere, Typically, that would be in /vár/run with an extension of .pid.

You can also create a shell script to kill your command, either by grepping t he output from ps for the pid, or reading the .pid file,and then kill it.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest