I want to make an Automator workflow to run a shell command. For example, I want to receive text input from the user and treat that input as a shell command instead of text. I have tried passing argument as stdin but still not able to make it work. Here is a simple example of what I am trying to do:

The user input some text, say, 'xyz'. I want to pass this text to shell script as follow

echo "$1/"

to get xyz as the output of the shell script to show in show result action of Automator.


1 Answer 1


When passing input to Run Shell Script in Automator you need to change Pass input: to stdin to Pass input: as arguments as shown in the example workflow below.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .