ShellCheck
automatically detects problems with sh/bash scripts and commands.

Paste shell script

or download and run locally

Get feedback

  
      Automated shell script analysis appears here.  
ShellCheck source and info. Also check out ExplainShell.com!