in reply to Execution order of END/CHECK vs BEGIN/INIT
I have to agree with you that this is a strange decision. BEGINs happening FIFO is obviously correct. The first one encountered is executed first, the second next etc.
With ENDs, intuatively, you would want think that the last one in the file would be the last one executed, the second from last, second from last etc. Ie. In LILO - Last in-Last out order.
I wonder if this comes down to someone missing the fact that LILO is actually the same as FIFO, and not FILO?
I'd rate this as a bug. No amount of documentation would persuade me this is correct. The fact the behaviour changes when certain command line switches are applied further persuades me that it is wrong.
If I ever need to make use of multiple END or CHECK blocks, I might even consider trying to find a way of applying the -n or -p switch to the script and 'disabling' the effects within the script so as to get the correct behaviour of the CHECK/END blocks:)
|
|---|