Work the Shell - Conditional Statements and Flow Control
There are, of course, many different ways to create more-advanced and sophisticated scripts, notably including shell script functions, but we'll delve into those as we proceed. I'm a big fan of just doing rather than talking around the topic forever.
I hope that's enough on the basics of flow control and conditional expression evaluation in this column. If you've some questions, don't forget that man sh produces more information on the power and capabilities of the Bourne Shell.
I don't know about you, but I'm eager to get moving onto some more complex and interesting scripting tasks, and I invite you to let me know via e-mail if there are specific types of scripts that you're interested in seeing featured here.
Dave Taylor is a 25-year veteran of UNIX, creator of The Elm Mail System and most recently author of both the best-selling Wicked Cool Shell Scripts and Teach Yourself Unix in 24 Hours, among his 16 technical books. His main Web site is at www.intuitive.com.
Dave Taylor has been hacking shell scripts for over thirty years. Really. He's the author of the popular "Wicked Cool Shell Scripts" and can be found on Twitter as @DaveTaylor and more generally at www.DaveTaylorOnline.com.
|A Project to Guarantee Better Security for Open-Source Projects||Aug 27, 2015|
|Concerning Containers' Connections: on Docker Networking||Aug 26, 2015|
|My Network Go-Bag||Aug 24, 2015|
|Doing Astronomy with Python||Aug 19, 2015|
|Build a “Virtual SuperComputer” with Process Virtualization||Aug 18, 2015|
|Firefox Security Exploit Targets Linux Users and Web Developers||Aug 17, 2015|
- A Project to Guarantee Better Security for Open-Source Projects
- Concerning Containers' Connections: on Docker Networking
- Problems with Ubuntu's Software Center and How Canonical Plans to Fix Them
- My Network Go-Bag
- Doing Astronomy with Python
- Firefox Security Exploit Targets Linux Users and Web Developers
- Build a “Virtual SuperComputer” with Process Virtualization
- August 2015 Issue of Linux Journal: Programming
- diff -u: What's New in Kernel Development
- Three More Lessons