LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I open a typescript file? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-open-a-typescript-file-924266/)

LAPIII 01-17-2012 11:53 AM

How do I open a typescript file?
 
Code:

script -a
&
Code:

script filename
will make a typescript file of a terminal session, I just don't know house to open the file!

kabamaru 01-17-2012 12:33 PM

Hi there

You can view it with cat, less, more, most, vim, emacs, whichever you like. If you want to edit it, run fromdos on the file first to get rid off ^M at the end of the lines.

LAPIII 01-17-2012 03:02 PM

I used Gedit and the formatting was messed up a bit, why is this?

kabamaru 01-17-2012 03:16 PM

Well it may have to do with what programs you used during your session's recording. For instance some text editor or any program that uses your monitor in a certain way like the vim editor or emacs (for vim I know by experience). They can produce pretty messed up stuff inside the typescript (weird meta characters, formatting issues etc.).

gr4nt 01-28-2012 04:32 PM

Adding to the above... script can be used to record both the console output, and its timing too. And scriptreplay is used to play it back, at the same speed, or faster if you wish.

This is my typical usage of script/scriptreplay, for when I do an upgrade...
Code:

datex="$(date +'%Y-%m-%d')"
script -f -t $datex.log 2>$datex.timing

    aptitude full-upgrade
    exit

# scriptreplay $datex.timing $datex.log



All times are GMT -5. The time now is 08:53 AM.