Troubleshooting and Debugging Bash

0
Join & Subscribe
LinkedIn Learning
Free Trial Available
English
Certificate Available
1-2 hours worth of material
selfpaced

Overview

Learn how to how to effectively troubleshoot and debug Bash scripts.

Programmers joke that 90% of all coding is actually debugging. In scripting, the number could be even higher. Learn how to resolve your Bash scripting issues faster and get your scripts to run right. This course teaches you how to how to set yourself up for success from the very beginning by learning what components to search for in a good script editor and how to use those features to build observability into your script. You can also discover how to more easily find and identify bugs within scripts by enabling logging techniques and reporting of error conditions. Instructor Sean Colins also explains how to successfully re-use code that you built—or that others have built before you—and efficiently locate and repair the most common Bash scripting bugs.

Syllabus

Introduction
  • Bash scripting basics
  • What you should know
1. Choosing an Editor
  • Research
  • Automatic code completion
  • Resizing text
  • Collapse code
  • Colored text
2. Formatting and Testing
  • Archiving work
  • Style guides
  • Script permissions
  • Escaping spaces
  • Case sensitivity
  • Testing in real life
3. Organization
  • Comment your script
  • Change logging
  • Placement of variables
  • Segment code into functions
  • Testing regular expressions
4. Troubleshooting Errors in Code
  • Find open arguments
  • Echo out progress
  • Piping status
  • Testing functions
  • Environment variables
  • Replacing variables
  • Math challenges
5. Reusing Code
  • Help
  • Reverse engineering
  • Cross-platform quirks
  • Learning commands
  • Reading man
  • Code repositories
Conclusion
  • Additional resources for Bash

Taught by

Sean Colins