Console Program For Mac Os

Our Mac reboot to restore software helps protect your Mac OS configuration. And manage Deep Freeze Mac. Complementary Deep Freeze Remote console to deploy. Our Mac reboot to restore software helps protect your Mac OS configuration. Start your 30 Day Free Trial. Download Deep Freeze for Mac. Our Mac reboot to restore software helps protect your Mac OS configuration. Complementary Deep Freeze Remote console to deploy and manage Deep Freeze Mac via Apple Remote Desktop (ARD). We've had a great response to OnSong Console for Mac! But just like any first release, we've found a few areas we could improve stability and performance as well as fix a crash when running OS X 10.9 or lower.

Active3 years, 9 months ago

In Windows, I can create .bat files. I double click it and all lines are interpreted as if I had entered it into the console.

In OS X, what file or program do I have to use? If I want write a file with;

Unzip Program For Mac Os

I want to double click this file and have it execute in a console. How I do this?

MacJason Salaz
17.1k16 gold badges83 silver badges136 bronze badges
Rodrigo

Console App Mac Os

Rodrigo
2681 gold badge4 silver badges15 bronze badges

6 Answers

The terminal underpinnings in OS X are the same as those used in Linux. What you are specifically looking for is commonly referred to as 'Shell Scripting'.

The default shell when you open Terminal.app (located in /Applications/Utilties) is the bash shell.

OS X has had a built-in shell handler accessible via Finder and other applications via the .command extension, though frustratingly not via the .sh extension. However, setting the script up to run via the Finder is even more complicated still.

  1. Create a simple shell script, like your example I've made a Hello World application:
  1. Save this file as HelloWorld.command.

  2. Give this file permission to be executed. chmod u+x HelloWorld.command should do that.

  3. Open the directory where you saved this file in Finder. Then double click on the HelloWorld.command file.

Paint Program For Mac

This will open up a terminal and execute the script, the output on my computer is the following:

$ /Users/jason/Applications/HelloWorld.command ; exit;
Hello World
logout

[Process completed]

The alternative way of executing this file is while still in the Terminal yourself, simply issue ./HelloWorld.command assuming you're in the same directory as the file.

Doing so will result in much simpler output:

jason-mac Applications $ ./HelloWorld.command
Hello World
jason-mac Applications $

You've just created and executed a shell script in OS X!

Jason SalazJason Salaz
17.1k16 gold badges83 silver badges136 bronze badges

The equivalent of the Console or Command Prompt in Windows is the Terminal app located in /Applications/Utilities/

The equivalent of DOS (or whatever they're calling it these days) is 'bash'

The equivalent of a batch file (.bat) in Windows is a shell script (.sh)

Just do a Google search for 'bash' 'reference' and you'll figure the rest out. I would also recommend buying the Bash Cookbook (O'Reilly).

Specifically, this would be what you would type into a terminal window to get your 'hello world' script:

To create the file:

To change permissions to make the file executable:

To run the script:

If you want to be able to double-click it from the Finder, right-click (or control-click) on the file and select Get Info, then under Open With, select the Terminal app. Or you could use the .command extension instead of the .sh extension.

Phil MPhil M
4911 gold badge4 silver badges17 bronze badges

You probably want to give AppleScript a look. This book by Sal Soghoian is considered by many the go-to book on AppleScript.

Another nice way for users to automate Mac apps is using Automator. You may want to give it a try as well. Hope this helps.

Update

It seems that you're looking for something like Unix shell scripting. This twotutorials are decent and seem to cover the basics.

Christian CorreaChristian Correa
2,5345 gold badges16 silver badges32 bronze badges

Shell scripts. I don't think Ask Different would be the suitable place to discuss it in depth but there's a very detailed guide here:http://tldp.org/LDP/abs/html/index.html

Mac OS X is UNIX Certified from 10.5 on (right?) so this wisdom here is also applicable to Linux and other UNIX-like OSs.

(in a less complex way, Mac OS X's Automator is pretty damn powerful, as is the AppleScript Editor, both of which can execute shell scripts and other commands with programs, and wrap them up into a convenient .app bundle for Launchpad or sharing with friends)

Kyle Cronin
18.1k19 gold badges76 silver badges138 bronze badges
SwizzlrSwizzlr

I made a video a couple of days ago explaining this. Hope this helps: http://www.youtube.com/watch?v=Q2jxpJAlsyg

mikemike
DavideDavide

You must log in to answer this question.

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

macOS is the operating system that powers every Mac. It lets you do things you simply can’t with other computers. That’s because it’s designed specifically for the hardware it runs on — and vice versa. macOS comes with an entire suite of beautifully designed apps. It works hand in hand with iCloud to keep photos, documents, and other stuff up to date on all your devices. It makes your Mac work like magic with your iPhone. And it’s been built from the ground up with privacy and security in mind.

macOS Mojave

Simply powerful.

Featuring Dark Mode, new pro-inspired features, four new apps, and a redesigned Mac App Store.

Easy to Use When it’s simple to do everything, you can do anything.

On a Mac, everything is designed to work just the way you expect it to — from operating it with simple, intuitive gestures to asking Siri to find a file to having your apps automatically update themselves. Whatever you set out to do on a Mac, there’s much less to learn and that much more to accomplish.

Best Email Program For Mac Os

Mac

Latest Mac Os

Dark Mode adds a dramatic new look to your desktop and apps that puts the focus on your content. Dynamic Desktop makes your Mac even more beautiful with two time-shifting desktop pictures that match the time of day wherever you are. And Stacks keeps your desktop free of clutter by automatically organizing your files, images, documents, PDFs, and more into tidy groups.