
Greetings
I'm trying to get as close to a switch statement in hush shell language as possible and thought that a set of if/then/elif/else would be tidier than nested if/then/else. It doesn't work how I expected however. The example below illustrates the problem - I was expecting execution after a true test (in the first 'if' in this case) to continue after the 'fi' but instead it ploughs through all the other executable (echo) statements having skipped the elif statements. It does correctly skip the else clause however :-))
Could someone assist in the navigation of this module to point out where would be a good place to start (i.e. some basic principles and assumptions of how the parser works).
[apologies for the word wrapping]
=>if iml; then echo "one"; elif iml; then echo "two"; elif iml; then echo "three"; else echo "four"; fi Image at 40340000: Image Name: Linux-2.4.22-20040129-12:57 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 630253 Bytes = 615.5 kB Load Address: 00000000 Entry Point: 00000000
one two three =>
Many thanks