Script the Command Line with Shell Scripts

As you probably know, macOS is based on Unix, and as such, there’s a whole layer of functionality most users never see. But you can access a long list of hidden files and useful tools in the text-based world of the command line.

A command-line interface is a way of giving instructions to a computer and getting results back. You type a command (a word or other sequence of characters) and press Return or Enter. The computer then processes that command and displays the result (often in a list or other chunk of text). In most cases, all your input and output remains on the screen, scrolling up as more appears. But only one line—usually the last line of text in the window, and usually designated by a blinking ...

Get Take Control of Automating Your Mac, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.