Section 2 Lesson 15: Scripting Flashcards

1
Q

Key Points

Key Points
Scripts can be used to automate system processes and extend the functionality of Jamf Pro.

A script is a collection of commands in a single file to be run in sequence.

Command-line interpreters specify which shell to use when running scripts.

macOS contains a variety of shells with different commands and syntax for access to the operating system’s services.

These can be found by running cat /etc/shells to list available shells.

When working in a command-line interpreter, the first line of a script begins with a shebang (#!), followed immediately by the path to a specific shell.

Z shell, or zsh, is the default login shell in macOS.

For computers running macOS Catalina or earlier, Bash is the default login shell.

Test existing sh/bash scripts with zsh before deploying.

Many text editors with a graphical user interface are available in the Mac App Store.

Comments can be added to a script using a hash sign (#).

sleep suspends command execution for an interval of time.

For example, sleep 3 waits three seconds before continuing with the next command.

say converts text to audible speech.

For example, say “Spoken text should be in double quotation marks” results in the computer speaking the phrase in quotes.

zsh invokes the Z shell to run a script.

For example, zsh jamfScript.zsh runs the script jamfScript.zsh.

A

https://youtu.be/i-BMnOjiY-0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly