Issue
How do I convert the following terminal commands to a .command
file so I can directly double click to run the command
Solution
just open what ever Texteditor you use and make a new file called example.command
(make sure you turn file extensions on so you don't create example.command.txt
) type line by line all the commands in that you want to run like this:
#!/bin/sh
cd /Applications/some\ apps\ to\ run/foo.app/Contents/MacOS
./fooexecutable -arg 12345
now execute chmod a+x ./example.command
and now you can run it either in the shell with ./example.command
or as you requested with double click via finder.
Answered By - SparkDev Answer Checked By - Pedro (WPSolving Volunteer)