Tutorial
bash & dash: Shell Scripting for Power Users
Carl Albing, Sr. S/W Eng./Commands and Tools, Cray, Inc.
JP Vossen
Date: Tuesday, July 24
Time: 1:30pm
- 5:00pm
Location: Oregon Ballroom 204
This tutorial teaches shell scripting the way Linux masters practice the craft. It presents a variety of recipes and tips for all levels of shell programmers so that anyone can improve their skills as a user and/or script writer using the bash shell and its lightweight cousin, dash.
With Ubuntu 6.10 the symlink for /bin/sh points to the dash shell, making it the default for shell scripts. The bash shell remains the command line default. Do you know their differences? This tutorial looks at these shells as powerful programming languages in their own right, capable of so much more than most users know. The tutorial consists of three major sections:
First, a rapid fire overview of shell language features: control sturctures, variables, arithmetic and string manipulation, aliases, and function definitions.
Second, there are Tips and Tricks to avoid the common goofs made by novice script writers.
Third, we look at some advance techniques for writing secure scripts and compare what works in bash vs. dash.
Then we deep-dive into two of three larger examples, (depending on audience interest) making use of what we have learned: one for loading an MP3 player, one for comparing two Open Document Format office documents, and one that steps through a Linux startup script.
Packed full of useful examples along with guidelines for how to create better scripts, this presentation gives professionals and power users what they need to know to automate routine tasks and to write production-quality scripts for their projects.









