[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is there a Shell Script Viewer that helps with if-then-else?



On Mon, Oct 08, 2007 at 02:24:22PM -0500, Martin McCormick wrote:
> 	In vi, one can hit % and jump to the corresponding
> parenthesis or brace which helps in complex situations. Is there
> anything that will show which fi directive went with which if?
> Sometimes, scripts can grow to a pretty messy state and it gets
> hard to tell what is included between any given fi directive and
> an if clause that might be several lines back and nest some
> other if-thens in between?
> 
> 	This tends to happen in shell scripts that started out
> simple and then one added this or that until . . . We've all
> been there at some point.
> 
> 	If there is such an application, it needs to work in
> normal non-GUI environments.
> 
> 	Thanks.
> 
> Martin McCormick
> Systems Engineer

Yeah, I've been there.  My answer was to print out the script and
highlight it.  Then re-implement it in Python.

I don't get there any more since, once a shell script nees decision and
looping (anything much more than a dos .bat file), I go straight for
python.  Then its small functions and modules in vim or idle.

Doug.



Reply to: