Chapter 15. Debugging Shell Scripts

Debugging Shell Scripts

Introduction

Programmers often spend more time debugging programs than writing them. Because many shell programs perform tasks that can affect the entire operating system, making sure those scripts perform properly is imperative. Whether you are a user or a system administrator writing scripts to automate simple or complex tasks, you want your script to do what you want it to do, and not cause weird and unexpected surprises even after all the syntax errors have been weeded out. The expression “If it ain't broke, don't fix it” is often ignored when you are thinking of ways to “improve” a script that is already working. ...

Get UNIX® Shells by Example Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.