Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

BramB

macrumors newbie
Original poster
I'm trying to make an automator workflow to create a terminal command.
At the moment I have automator set to get 2 variables:
1 - the current url in safari
2 - a number specified by the user

How can I combine those two variables into a terminal command that consist of the following parameters:

"program command" "variable 1" "program option a" "program option b+variable 2".

Someone has an idea?
 
Hope this helps you.

I'm trying to make an automator workflow to create a terminal command.
At the moment I have automator set to get 2 variables:
1 - the current url in safari
2 - a number specified by the user

How can I combine those two variables into a terminal command that consist of the following parameters:

"program command" "variable 1" "program option a" "program option b+variable 2".

Someone has an idea?

I ran across this post trying to figure this out, and I just figured out a way to do this. Each variable line can be referenced with $x, so if theres 3 lines of variables, for example:

1. http://
2. macrumors
3. .com

You can use the Run Shell Script action to run the command "open "$1""$2""$3"" to output the command "open http://macrumors.com".

If you add spaces between "$1", "$2", and "$3", the command will have spaces too.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.