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
On Sun, Apr 7, 2024, 22:58 Robert Elz <[email protected]> wrote:
> Date: Mon, 8 Apr 2024 02:50:29 +0100
> From: Kerin Millar <[email protected]>
> Message-ID: <[email protected]>
>
> | which is to read scripts in their entirety before trying to execute
> | the resulting program. To go about it that way is not typical of sh
> | implementations, for whatever reason.
>
> Shells interpret their input in much the same way, regardless of
> from where it comes. Would you really want your login shell to
> just collect commands that you type (possibly objecting to those
> with syntax errors) but executing none of them (including "exit")
> until you log out (send EOF) ?
>
> kre
>
>
>
>