JShoe
JShoe

Reputation: 3428

How to make a stand alone Mac Terminal Program?

I want to be able to save a file in a way that opening it with a regular double-click runs it. Also is there a mac equivalent of @ECHO OFF that makes it so no text shows up in terminal?

Upvotes: 1

Views: 6501

Answers (2)

Michael J. Barber
Michael J. Barber

Reputation: 25042

If you save a script with the file extension .command, it will be double-clickable in the Finder.

Upvotes: 2

mu is too short
mu is too short

Reputation: 434685

Probably the easiest thing to do would be to wrap your script or program in a tiny bit of AppleScript:

do shell script "/your/command/here"

Then save it as an application and it will behave like any other OSX application.

The shell shouldn't be printing the commands as they're run unless you're supplying the -x switch so I'm not sure what you want @ECHO OFF for.

Upvotes: 2

Related Questions