save several bash screens of program input/output

The name of the pictureThe name of the pictureThe name of the pictureClash 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.







share|improve this question


























    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.







    share|improve this question
























      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.







      share|improve this question














      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.









      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 15 '17 at 21:17









      Gilles

      507k12010031530




      507k12010031530










      asked Dec 15 '17 at 20:27









      nate

      1518




      1518




















          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





          share|improve this answer




















          • 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











          • 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










          • 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

















          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)






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            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






























            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





            share|improve this answer




















            • 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











            • 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










            • 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














            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





            share|improve this answer




















            • 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











            • 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










            • 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












            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





            share|improve this answer












            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






            share|improve this answer












            share|improve this answer



            share|improve this answer










            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 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










            • 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










            • 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










            • 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












            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)






            share|improve this answer
























              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)






              share|improve this answer






















                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)






                share|improve this answer












                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)







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 22 '17 at 19:06









                Hans Lub

                21614




                21614






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    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













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)