Troubleshooting and Debugging Bash

Troubleshooting and Debugging Bash

1h 5mAdvanced2019-12-12

Authors

Sean Colins

Sean Colins

Management Consultant, Author, Trainer, and Entrepreneur

Course details

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.

Learning objectives
Choosing an editor
Leveraging automatic code completion
Formatting code
Setting script permissions
Organizing and segmenting code
Adding valuable comments
Testing regular expressions
Troubleshooting errors
Testing functions
Replacing variables
Reverse-engineering existing code
Learning commands
Accessing code repositories

Skills covered

BashIT AutomationNetwork and System AdministrationOpen SourceDeep Dive (X:Y)

Concepts

Introduction

  • Bash scripting basics
  • What you should know

Choosing an Editor

  • Research
  • Automatic code completion
  • Resizing text
  • Collapse code
  • Colored text

Formatting and Testing

  • Archiving work
  • Style guides
  • Script permissions
  • Escaping spaces
  • Case sensitivity
  • Testing in real life

Organization

  • Comment your script
  • Change logging
  • Placement of variables
  • Segment code into functions
  • Testing regular expressions

Troubleshooting Errors in Code

  • Find open arguments
  • Echo out progress
  • Piping status
  • Testing functions
  • Environment variables
  • Replacing variables
  • Math challenges

Reusing Code

  • Help
  • Reverse engineering
  • Cross-platform quirks
  • Learning commands
  • Reading man
  • Code repositories

Conclusion

  • Additional resources for Bash
40,000 Toman