Bash scripting: Do This, Not That.

Speakers: Ryan Manly

Level: Intermediate, Lecture

Excerpt: In this talk I am going to explain what I have learned about Bash to make your code less error-prone, more efficient, and easily readable. By the conclusion of this session attendees will understand how Bash uses word splitting to identify tokens and why proper (even excessive) quoting is so important. Simple ways to shorten pipelines, the importance of style, and “asking software the right questions” will also be discussed.

Description: Using Bash for shell scripting is simple, you just put a bunch of commands in a list and the computer happily executes them. This apparent simplicity can be a seductive trap that may result in the deletion of an OS from a hard disk drive. This is what makes Bash so frustrating to troubleshoot for many admins. In this talk I am going to explain what I have learned about Bash to make your code less error-prone, more efficient, and easily readable.

By the conclusion of this session attendees will understand how Bash uses word splitting to identify tokens and why proper (even excessive) quoting is so important. Attendees will see why you almost never need more than two operations in a pipeline through the use of examples that can be leveraged in their own environments. A discussion of style will be presented, as well as other recommendations for exploring various cli program features and “asking software the right questions”.


About the speakers

Ryan Manly – Senior Macintosh Support – Glenbrook High School District 225 (Twitter: @rmanly)

Ryan Manly is an OS X Systems Administrator at a high school district in the northern suburbs of Chicago. He currently manages 800 Macs with a variety of free and open-source tools. Ryan’s history with Bash started in 1998 after installing Slackware Linux from a ridiculous number of floppy disks…twice.

This entry was posted in MacAdmins 2016 Sessions. Bookmark the permalink.