I understand goto's are poor programming - but I have some rather lengthy shell scripts I have to test. If everything works but the last 10 lines - I need to run through script for say the first 2 steps to initialize and than I want to skip down to the last 10 lines to retest those. Currently - I am cutting and pasting to create a smaller version of the script - but this is always a potential area for errors on reassmbly. So I would like to be able to make my code SKIP a big chunk. Thought about If loops - but cannot think how I would get that to work. Any ideas from some of you pro scripters?
Start Free Trial