Debug Your Shell Scripts with ShellCheck

By

Use ShellCheck to find common scripting errors.

ShellCheck is a free and open source tool that can be used to check and improve shell scripts, says Egidio Docile. "It is able to highlight both common and edge-case errors, and suggest the appropriate fixes."

The ShellCheck utility is also included in the software repositories of most Linux distributions. This tutorial shows:

  • How to install ShellCheck
  • How to use ShellCheck
  • How to integrate ShellCheck in Vim and Visual Studio Code

Learn more at LinuxConfig.

 
 

 
 

02/08/2023

Related content

  • Best practices for secure script programming
    The lax syntax verification of shell scripts and a lack of attention to detail in programming can create impressively dangerous security vulnerabilities.
  • Debugging Bash scripts automatically
    We look at various extension frameworks that make the life of developers and administrators easier when debugging a script.
  • Optimization and standardization of PowerShell scripts
    When PowerShell one-liners become full-blown scripts that have an effect throughout the enterprise, IT managers need to review their software development strategies. We look at PowerShell best practices for script design, notation, error handling, and documentation.
  • Comparing Logon Script Alternatives
    We compare the performance of batch, VBScript, and PowerShell commands with four standard tasks.
  • PowerShell Part 1: Retrieving System Information

    Windows administrators, like Unix or Linux administrators, look for ways to perform their duties with ease and elegance through automation. PowerShell allows administrators to gather information, change Registry parameters, work with Active Directory, manipulate services, look at events, work with Windows Management Instrumentation (WMI), and much more. PowerShell is a Windows administrator’s best friend.

comments powered by Disqus