I'm new to GAP and have some trouble with its script. Here is the script that I wrote: foo.gap
#!/usr/bin/gap -q
Display(1 + 1);
quit;
I expected if I type "./foo.gap" then it displays 2 and returns control:
$ ./foo.gap
2
$
However it doesn't return control as I expected; it still waiting commands (that is, typing "Display(2 + 3);" returns 5, for example).
$ ./foo.gap
2
Display(2 + 3);
5
It seems that, however, typing these separately works.
$ gap -q
Display(1 + 1);
2
quit;
$
Would you please help me? What's wrong with the first script, foo.gap? Thank you.
Read(...)
them into GAP. Is a possible alternative for you? I didn't realise this feature was even present. – Douglas S. Stones Aug 26 '13 at 10:17QUIT;
– Jack Schmidt Aug 26 '13 at 13:21