Synopses & Reviews
Beginning Shell Scripting
Shell scripts give you the power to automate tedious daily tasks, improve your work capabilities, and get more out of your computers. Whether you are working on Mac OS®X, Linux®, Unix®, or Windows®, this book presents complete shell scripting instructions, robust code examples, and full scripts for customizing your operating system.
You'll first learn the basics of shell scripts, including what they are, how they run, and how you can design executable commands from them. You'll then progress to more advanced scripting topics, such as using awk and sed commands, building command pipelines, and creating functions. This book covers everything you'll need to know about shells and scripting in order to begin writing your own.
What you will learn from this book
- How shells work and how to find them on your system
- Steps for passing data to a shell script and modifying your environment
- Techniques for creating, reading, enhancing, and removing files
- How to query about processes and gather information about what is running on your system
- Tips for editing and debugging scripts
- Ways to monitor and administer your system using scripts
- How to call on your desktop applications from scripts
Who this book is for
This book is for anyone who wants to get more out of their computer systems, including Mac OS X, Linux, Unix, and Windows users.
Wrox Beginning guides are crafted to make learning programming languages and technologies easier than you think, providing a structured tutorial format that will guide you through all the techniques involved.
Synopsis
- Covering all major platforms-Linux, Unix, Mac OS X, and Windows-this guide shows programmers and power users how to customize an operating system, automate commands, and simplify administration tasks using shell scripts
- Offers complete shell-scripting instructions, robust code examples, and full scripts for OS customization
- Covers shells as a user interface, basic scripting techniques, script editing and debugging, graphing data, and simplifying administrative tasks
- In addition to Unix and Linux scripting, the book covers the latest Windows scripting techniques and offers a complete tutorial on Mac OS X scripting, including detailed coverage of mobile file systems, legacy applications, Mac text editors, video captures, and the Mac OS X Open Scripting Architecture
About the Author
Eric Foster-Johnson (Arden Hills, MN) is a veteran programmer who works daily with Linux, Unix, Windows, Mac OS X, and other operating systems. By day, he writes enterprise Java software for ObjectPartners, a Minnesota consulting firm. He has authored a number of Linux and Unix titles including
Red Hat RPM Guide,
Teach Yourself Linux,
Teach Yourself Unix, and
Perl Modules.
John C. Welch (Boston, MA) has more than ten years of Mac experience in the trenches of the IT world. He packs the hall at Macworld Expo where he’s a regular speaker, sharing his experiences and knowledge on using Macs effectively in business and enterprise IT environments. John’s articles are frequently featured in MacTech Magazine and WorkingMac.com, and he is semi-regularly featured on The Mac Show conducting interviews with the geekier side of the Mac community. He’s recently been touring the country presenting seminars on Mac OS X administration to IT professionals from coast to coast.
Micah Anderson has been a Unix system administrator for more than a decade. He is a Debian GNU/Linux developer and works as an independent consultant building alternative communication infrastructure and supporting the technology needs of positive grassroots alternatives.
Table of Contents
Introduction.
Chapter 1: Introducing Shells.
Chapter 2: Introducing Shell Scripts.
Chapter 3: Controlling How Scripts Run.
Chapter 4: Interacting with the Environment.
Chapter 5: Scripting with Files.
Chapter 6: Processing Text with sed.
Chapter 7: Processing Text with awk.
Chapter 8: Creating Command Pipelines.
Chapter 9: Controlling Processes.
Chapter 10: Shell Scripting Functions.
Chapter 11: Debugging Shell Scripts.
Chapter 12: Graphing Data with MRTG.
Chapter 13: Scripting for Administrators.
Chapter 14: Scripting for the Desktop.
Appendix A: Answers to Exercises.
Appendix B: Useful Commands.
Index.