save several bash screens of program input/output

Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I work in Maxima a lot (start it on the terminal with "rlwrap .../maxima" and sometimes I want to save a few (several) screens worth (scrolling) of calculations.
I realize I can use xmaxima, a variant that can then save it to a text file - that works. But I also sometimes use scipy/python in the terminal, or even others.
In general, is there a way to save several screens of interactive program input/output from the bash terminal to a file (possibly preserving 'word art', or 2D display)?
I use terminator, though not sure it matters. Also, sometimes I work on a debian system and other times on Linux Mint.
terminal logs output gnome-terminator
add a comment |Â
up vote
1
down vote
favorite
I work in Maxima a lot (start it on the terminal with "rlwrap .../maxima" and sometimes I want to save a few (several) screens worth (scrolling) of calculations.
I realize I can use xmaxima, a variant that can then save it to a text file - that works. But I also sometimes use scipy/python in the terminal, or even others.
In general, is there a way to save several screens of interactive program input/output from the bash terminal to a file (possibly preserving 'word art', or 2D display)?
I use terminator, though not sure it matters. Also, sometimes I work on a debian system and other times on Linux Mint.
terminal logs output gnome-terminator
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I work in Maxima a lot (start it on the terminal with "rlwrap .../maxima" and sometimes I want to save a few (several) screens worth (scrolling) of calculations.
I realize I can use xmaxima, a variant that can then save it to a text file - that works. But I also sometimes use scipy/python in the terminal, or even others.
In general, is there a way to save several screens of interactive program input/output from the bash terminal to a file (possibly preserving 'word art', or 2D display)?
I use terminator, though not sure it matters. Also, sometimes I work on a debian system and other times on Linux Mint.
terminal logs output gnome-terminator
I work in Maxima a lot (start it on the terminal with "rlwrap .../maxima" and sometimes I want to save a few (several) screens worth (scrolling) of calculations.
I realize I can use xmaxima, a variant that can then save it to a text file - that works. But I also sometimes use scipy/python in the terminal, or even others.
In general, is there a way to save several screens of interactive program input/output from the bash terminal to a file (possibly preserving 'word art', or 2D display)?
I use terminator, though not sure it matters. Also, sometimes I work on a debian system and other times on Linux Mint.
terminal logs output gnome-terminator
edited Dec 15 '17 at 21:17
Gilles
507k12010031530
507k12010031530
asked Dec 15 '17 at 20:27
nate
1518
1518
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
5
down vote
accepted
This is what the script tool is for. It will save an entire terminal session - inputs and outputs:
$ script sessionlog.txt
[ do stuff ]
$ exit
$ ls sessionlog.txt
Wow, super cool! I hadn't heard of it before so thanks, but I am getting lots of weird symbols in the output file. Unfortunately I couldn't even get something like `org' from emacs to work either.
â nate
Dec 15 '17 at 21:22
Those strange characters in the output file are what move the cursor around and change character cell colours. If youcatthe file you'll see exactly what you saw when you made the recording. As it's a complete record of everything that happens, you'll see everything that transpired, including mistakes you made, backspaced over, and corrected.
â DopeGhoti
Dec 15 '17 at 22:47
I see... yeah, an editor does show those symbols, whilecat' doesn't.... I triedcat scriptOut.txt > scriptOut2.txt' but it is not any cleaner. I also looked at the man pages but no idea of how to not caputre those symbols...
â nate
Dec 15 '17 at 23:26
If you remove those symbols, you are removing the data required to accurately recreate your terminal session.
â DopeGhoti
Dec 18 '17 at 16:42
maybe my question wasn't clear... maxima, python, reduce, and other similar programs (I don't know about all), wouldn't need these symbols at all. I was thinking of something like org for emacs, or saving a session in xiki, or... but this is cool tool for sure.
â nate
Dec 18 '17 at 16:57
add a comment |Â
up vote
1
down vote
Especially since you're already using rlwrap:
rlwrap has a --logfile (shorter:-l) option that will save the entire session (all edited input lines, and all output from the rlwrapped command) to a file:
rlwrap --logfile log.txt ../maxima
script is brilliant, but will also save all your typos and their corrections, which may be more than you need. rlwrap doesn't record anything until you enter a line, and then remembers only that line (and any command output that comes after it)
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
This is what the script tool is for. It will save an entire terminal session - inputs and outputs:
$ script sessionlog.txt
[ do stuff ]
$ exit
$ ls sessionlog.txt
Wow, super cool! I hadn't heard of it before so thanks, but I am getting lots of weird symbols in the output file. Unfortunately I couldn't even get something like `org' from emacs to work either.
â nate
Dec 15 '17 at 21:22
Those strange characters in the output file are what move the cursor around and change character cell colours. If youcatthe file you'll see exactly what you saw when you made the recording. As it's a complete record of everything that happens, you'll see everything that transpired, including mistakes you made, backspaced over, and corrected.
â DopeGhoti
Dec 15 '17 at 22:47
I see... yeah, an editor does show those symbols, whilecat' doesn't.... I triedcat scriptOut.txt > scriptOut2.txt' but it is not any cleaner. I also looked at the man pages but no idea of how to not caputre those symbols...
â nate
Dec 15 '17 at 23:26
If you remove those symbols, you are removing the data required to accurately recreate your terminal session.
â DopeGhoti
Dec 18 '17 at 16:42
maybe my question wasn't clear... maxima, python, reduce, and other similar programs (I don't know about all), wouldn't need these symbols at all. I was thinking of something like org for emacs, or saving a session in xiki, or... but this is cool tool for sure.
â nate
Dec 18 '17 at 16:57
add a comment |Â
up vote
5
down vote
accepted
This is what the script tool is for. It will save an entire terminal session - inputs and outputs:
$ script sessionlog.txt
[ do stuff ]
$ exit
$ ls sessionlog.txt
Wow, super cool! I hadn't heard of it before so thanks, but I am getting lots of weird symbols in the output file. Unfortunately I couldn't even get something like `org' from emacs to work either.
â nate
Dec 15 '17 at 21:22
Those strange characters in the output file are what move the cursor around and change character cell colours. If youcatthe file you'll see exactly what you saw when you made the recording. As it's a complete record of everything that happens, you'll see everything that transpired, including mistakes you made, backspaced over, and corrected.
â DopeGhoti
Dec 15 '17 at 22:47
I see... yeah, an editor does show those symbols, whilecat' doesn't.... I triedcat scriptOut.txt > scriptOut2.txt' but it is not any cleaner. I also looked at the man pages but no idea of how to not caputre those symbols...
â nate
Dec 15 '17 at 23:26
If you remove those symbols, you are removing the data required to accurately recreate your terminal session.
â DopeGhoti
Dec 18 '17 at 16:42
maybe my question wasn't clear... maxima, python, reduce, and other similar programs (I don't know about all), wouldn't need these symbols at all. I was thinking of something like org for emacs, or saving a session in xiki, or... but this is cool tool for sure.
â nate
Dec 18 '17 at 16:57
add a comment |Â
up vote
5
down vote
accepted
up vote
5
down vote
accepted
This is what the script tool is for. It will save an entire terminal session - inputs and outputs:
$ script sessionlog.txt
[ do stuff ]
$ exit
$ ls sessionlog.txt
This is what the script tool is for. It will save an entire terminal session - inputs and outputs:
$ script sessionlog.txt
[ do stuff ]
$ exit
$ ls sessionlog.txt
answered Dec 15 '17 at 21:04
DopeGhoti
40.5k54979
40.5k54979
Wow, super cool! I hadn't heard of it before so thanks, but I am getting lots of weird symbols in the output file. Unfortunately I couldn't even get something like `org' from emacs to work either.
â nate
Dec 15 '17 at 21:22
Those strange characters in the output file are what move the cursor around and change character cell colours. If youcatthe file you'll see exactly what you saw when you made the recording. As it's a complete record of everything that happens, you'll see everything that transpired, including mistakes you made, backspaced over, and corrected.
â DopeGhoti
Dec 15 '17 at 22:47
I see... yeah, an editor does show those symbols, whilecat' doesn't.... I triedcat scriptOut.txt > scriptOut2.txt' but it is not any cleaner. I also looked at the man pages but no idea of how to not caputre those symbols...
â nate
Dec 15 '17 at 23:26
If you remove those symbols, you are removing the data required to accurately recreate your terminal session.
â DopeGhoti
Dec 18 '17 at 16:42
maybe my question wasn't clear... maxima, python, reduce, and other similar programs (I don't know about all), wouldn't need these symbols at all. I was thinking of something like org for emacs, or saving a session in xiki, or... but this is cool tool for sure.
â nate
Dec 18 '17 at 16:57
add a comment |Â
Wow, super cool! I hadn't heard of it before so thanks, but I am getting lots of weird symbols in the output file. Unfortunately I couldn't even get something like `org' from emacs to work either.
â nate
Dec 15 '17 at 21:22
Those strange characters in the output file are what move the cursor around and change character cell colours. If youcatthe file you'll see exactly what you saw when you made the recording. As it's a complete record of everything that happens, you'll see everything that transpired, including mistakes you made, backspaced over, and corrected.
â DopeGhoti
Dec 15 '17 at 22:47
I see... yeah, an editor does show those symbols, whilecat' doesn't.... I triedcat scriptOut.txt > scriptOut2.txt' but it is not any cleaner. I also looked at the man pages but no idea of how to not caputre those symbols...
â nate
Dec 15 '17 at 23:26
If you remove those symbols, you are removing the data required to accurately recreate your terminal session.
â DopeGhoti
Dec 18 '17 at 16:42
maybe my question wasn't clear... maxima, python, reduce, and other similar programs (I don't know about all), wouldn't need these symbols at all. I was thinking of something like org for emacs, or saving a session in xiki, or... but this is cool tool for sure.
â nate
Dec 18 '17 at 16:57
Wow, super cool! I hadn't heard of it before so thanks, but I am getting lots of weird symbols in the output file. Unfortunately I couldn't even get something like `org' from emacs to work either.
â nate
Dec 15 '17 at 21:22
Wow, super cool! I hadn't heard of it before so thanks, but I am getting lots of weird symbols in the output file. Unfortunately I couldn't even get something like `org' from emacs to work either.
â nate
Dec 15 '17 at 21:22
Those strange characters in the output file are what move the cursor around and change character cell colours. If you
cat the file you'll see exactly what you saw when you made the recording. As it's a complete record of everything that happens, you'll see everything that transpired, including mistakes you made, backspaced over, and corrected.â DopeGhoti
Dec 15 '17 at 22:47
Those strange characters in the output file are what move the cursor around and change character cell colours. If you
cat the file you'll see exactly what you saw when you made the recording. As it's a complete record of everything that happens, you'll see everything that transpired, including mistakes you made, backspaced over, and corrected.â DopeGhoti
Dec 15 '17 at 22:47
I see... yeah, an editor does show those symbols, while
cat' doesn't.... I tried cat scriptOut.txt > scriptOut2.txt' but it is not any cleaner. I also looked at the man pages but no idea of how to not caputre those symbols...â nate
Dec 15 '17 at 23:26
I see... yeah, an editor does show those symbols, while
cat' doesn't.... I tried cat scriptOut.txt > scriptOut2.txt' but it is not any cleaner. I also looked at the man pages but no idea of how to not caputre those symbols...â nate
Dec 15 '17 at 23:26
If you remove those symbols, you are removing the data required to accurately recreate your terminal session.
â DopeGhoti
Dec 18 '17 at 16:42
If you remove those symbols, you are removing the data required to accurately recreate your terminal session.
â DopeGhoti
Dec 18 '17 at 16:42
maybe my question wasn't clear... maxima, python, reduce, and other similar programs (I don't know about all), wouldn't need these symbols at all. I was thinking of something like org for emacs, or saving a session in xiki, or... but this is cool tool for sure.
â nate
Dec 18 '17 at 16:57
maybe my question wasn't clear... maxima, python, reduce, and other similar programs (I don't know about all), wouldn't need these symbols at all. I was thinking of something like org for emacs, or saving a session in xiki, or... but this is cool tool for sure.
â nate
Dec 18 '17 at 16:57
add a comment |Â
up vote
1
down vote
Especially since you're already using rlwrap:
rlwrap has a --logfile (shorter:-l) option that will save the entire session (all edited input lines, and all output from the rlwrapped command) to a file:
rlwrap --logfile log.txt ../maxima
script is brilliant, but will also save all your typos and their corrections, which may be more than you need. rlwrap doesn't record anything until you enter a line, and then remembers only that line (and any command output that comes after it)
add a comment |Â
up vote
1
down vote
Especially since you're already using rlwrap:
rlwrap has a --logfile (shorter:-l) option that will save the entire session (all edited input lines, and all output from the rlwrapped command) to a file:
rlwrap --logfile log.txt ../maxima
script is brilliant, but will also save all your typos and their corrections, which may be more than you need. rlwrap doesn't record anything until you enter a line, and then remembers only that line (and any command output that comes after it)
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Especially since you're already using rlwrap:
rlwrap has a --logfile (shorter:-l) option that will save the entire session (all edited input lines, and all output from the rlwrapped command) to a file:
rlwrap --logfile log.txt ../maxima
script is brilliant, but will also save all your typos and their corrections, which may be more than you need. rlwrap doesn't record anything until you enter a line, and then remembers only that line (and any command output that comes after it)
Especially since you're already using rlwrap:
rlwrap has a --logfile (shorter:-l) option that will save the entire session (all edited input lines, and all output from the rlwrapped command) to a file:
rlwrap --logfile log.txt ../maxima
script is brilliant, but will also save all your typos and their corrections, which may be more than you need. rlwrap doesn't record anything until you enter a line, and then remembers only that line (and any command output that comes after it)
answered Dec 22 '17 at 19:06
Hans Lub
21614
21614
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f411132%2fsave-several-bash-screens-of-program-input-output%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password