views:

46

answers:

2

I'm looking for something similiar to indent but for (bash) scripts. Console only, no colorizing, etc.

Do you know of one ?

A: 

Vim can indent bash scripts. But not reformat them before indenting.
Backup your bash script, open it with vim, type gg=GZQ and indent will be corrected.

Though, some bugs with << (expecting EOF as first character on a line) e.g.

Benoit
+1  A: 

Found this http://www.linux-kheops.com/doc/perl/perl-aubert/fmt.script .

Very nice, only one thing i took out is the [...]->test substitution.

PeterMmm