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

Paste shell script

or download and run locally. Advice is shell specific, so include the shebang!

Get feedback

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