5
$\begingroup$

I am not sure whether this was asked before, but I didn't find a reference in GAP system documentation on how to print the history of the command line (Ubuntu installation).

For instance:

gap> G := Group((1,2)(3,4),(1,2,3));
> irr := Irr(G);

How to save or print the list of my previous commands (similar to history command on Ubuntu).

Many thanks.

$\endgroup$
3
  • $\begingroup$ I suggest you send an inquiry to the GAP Forum. There are lots of experts there that can help you. $\endgroup$ Mar 13, 2021 at 18:05
  • 1
    $\begingroup$ You can use LogTo("filename.txt"); to save all subsequent output (including commands you run) to the specified file, if this is what you want. To stop saving, use LogTo(); (i.e. with no argument). $\endgroup$ Mar 13, 2021 at 18:05
  • $\begingroup$ Works perfectly, many thanks! Could you please turn it into an answer? $\endgroup$
    – Conjecture
    Mar 13, 2021 at 18:08

1 Answer 1

6
$\begingroup$

There are three commands that will do all variations of this:

  1. LogTo("filename.txt") will save all subsequent input and output to a file with the specified name.
  2. InputLogTo("filename.txt") will save all subsequent input to a file with the specified name.
  3. OutputLogTo("filename.txt") will save all subsequent output to a file with the specified name.

In all three cases, running the command with no argument will stop the logging. More details can be found here in the GAP Manual.

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.