41 Running from the Command Line

In this book, you have built and run many command-line tools in Xcode. Running in Xcode works great for testing programs and for learning programming. However, if you create a command-line tool to use in real life, then you will want to run it from the command line.

In a Mac, you typically use Terminal to run programs from the command line. The Terminal app is just a pretty interface to what is called a shell. There are a few different shells with catchy names like csh, sh, zsh, and ksh, but nearly all Mac users use bash.

To run a program from the command line, you enter the path of the program’s executable file in Terminal and press Return.

In Xcode, return to your gradeInTheShade project ...

Get Objective-C Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.