A quick Google search for "beautify shell program" turns up quite a few... take a look, see what you think.
If you're doing shell programming or editing of your own and you use
vi or
vim you can turn on
autoindent. What that does is you hit the tab key and the editor will keep the indent at that tab for you each time you hit the carriage return; and additional tab will add additional indent, Control-D will undent one step at a time back to the left margin. Handy.
If you're programming in C, you can set
showmatch. That will cause the cursor to flip back and forth showing a match (or not if you miss one) for parenthesis (), brackets [] and braces {}.
showmatch works in any file, so if you open a paren ( and you enter a ) you'll get the cursor flip showing the match (and if you do too many closes, you'll get told about it). Also handy.
If you create a file in your home directory named
.exrc with content like this (then log out and back in again so it take effect)
Code:
cat .exrc
set autoindent showmode showmatch
Those options will be turned on every time you start the editor (
showmdoe displays what editing mode you're in at the bottom of the screen).
EMACS user? On your own...
Hope this helps some.