[GAP Forum] Gap doesn't quit automatically when running in script mode.

Hongyi Zhao hongyi.zhao at gmail.com
Sat Apr 30 14:00:57 BST 2022


On Sat, Apr 30, 2022 at 6:58 PM Max Horn <horn at mathematik.uni-kl.de> wrote:
>
> Hi Hongyi,
>
> you need to use
>
>     QUIT;

Nice. It does the trick. But why must it be used like this?

> instead of "quit".
>
> However, the result can still hang if there is an error in the script. To prevent this, I strongly recommend to pass the --quitonbreak to gap when using it non-interactively:
>
>   gap --quitonbreak myscript.g

Thank you for your tip. Based on the notes here [1-2], I adopted the
following shebang line:

#!/usr/bin/env -S gap --quitonbreak

And then test it as follows:

$ chmod +x abstract-group-irrep.gap
$ ./abstract-group-irrep.gap

> Cheers
> Max

Yours sincerely,
Hongyi



More information about the Forum mailing list