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.
- why is GNOME 3 in the fifth position at 14.1 %?
4 hours 21 min ago
- Sublime Is Brilliant!
9 hours 24 min ago
9 hours 43 min ago
- Rapid[Disk,Cache] better than native ram caching?
10 hours 8 min ago
- Nothing is perfect
10 hours 21 min ago
- Mixtapes Community
16 hours 47 sec ago
- KDE is one true DE
16 hours 35 min ago
- Command Line Shells (Bash, Zsh, etc.) are 2nd place
17 hours 3 min ago
18 hours 58 min ago
- yes it's Jupiter Broadcasting
20 hours 18 min ago