Great output in a generic lisp terminal linux

I wrote a clisp program that outputs n sets of x * y random integers. I would like to make n = 100, but I can not copy and paste it all because my linux terminal does not come back far enough for the lack of a better word.

I would like the easiest way to capture 2200 lines of linux terminal output.

+4
source share
3 answers

From Lisp, there are various ways to output your file to a file.

  • you can have REPL interaction stored in a file. See the DRIBBLE function.

  • you can also wrap your code with WITH-OPEN-FILE.

Example:

(with-open-file (*standard-output* "/tmp/foo.text" :direction :output) (your-print-function-here)) 
+3
source

In addition to the comment above, I use sbcl on the command line to output the output. Just upload your library and then evaluate what you need.

Example:

 sbcl --noinform --load "compass.lisp" \ --eval "(print (table-egs (cocomo81)))" \ --eval "(quit)" > copy.txt 
+3
source

There are several different terminal programs for Linux. All of them have more or less affordable ways to adjust the number of scroll lines. I'm not on my Linux box right now, but I remember that this was a relatively obvious place in the Settings menu for the GNOME terminal, and I would suggest that KDE is similar.

Secondly, it is recommended to use shell redirection; which is a more general useful tactic.

+1
source

All Articles