保存程序输入/输出的几个bash屏幕

nat*_*ate 1 logs terminal output gnome-terminator

我经常在 Maxima 工作(在终端上使用“rlwrap .../maxima”启动它,有时我想保存一些(几个)值得(滚动)计算的屏幕。

我意识到我可以使用 xmaxima,这是一种可以将其保存到文本文件的变体 - 有效。但我有时也会在终端中使用 scipy/python,甚至其他人。

一般来说,有没有办法将来自 bash 终端的交互式程序输入/输出的几个屏幕保存到一个文件中(可能保留“艺术字”或 2D 显示)?

我使用终结者,但不确定它是否重要。另外,有时我在 debian 系统上工作,有时在 Linux Mint 上工作。

Dop*_*oti 5

这就是该script工具的用途。它将保存整个终端会话 - 输入和输出:

$ script sessionlog.txt
[ do stuff ]
$ exit
$ ls sessionlog.txt
Run Code Online (Sandbox Code Playgroud)