automatically format Shell Script (bash)

Hi

In TOAD[0] I can write SQL code, then select the SQL code

 -> Menu Edit -> Format Code

The output is well formatted code (correct indent, ...)

Is there a tool (for Windows and/or UNIX) what can do the same for bash code?

[0] TOAD (software) - Wikipedia, the free encyclopedia

You need either cold-folding in your editor of choice, which can be cumbersome...or simply syntax highlighting, such as what UltraEdit-32 offers...

Beyond that, pretty code starts with your own fingers. Makes it much easier to comprehend if the folding is one based on your own sense of formatting.