On Mon, 8 Apr 2024, at 5:29 AM, John Passaro wrote: > if you wanted this for your script - read all then start semantics, as > opposed to read-as-you-execute - would it work to rewrite yourself > inside a function? > > function main() { ... } ; main
Mostly, yes. My initial post in this thread spoke of it. It isn't a panacea because a sufficiently large compound command can cause bash to run out of stack space. In that case, all one can do is to break the script down further into additional, smaller, functions. -- Kerin Millar