Questions tagged [typescript]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
70
votes
13answers
44k views

Removing control chars (including console codes / colours) from script output

I can use the "script" command to record an interactive session at the command line. However, this includes all control characters and colour codes. I can remove control characters (like backspace) ...
21
votes
5answers
6k views

Typescript -terminal recording into video?

We need to make some videos about working with LaTex documents. We have the typescript and timing -files and now we need to convert them into videos to display them in answers. Basically, the way to ...
10
votes
3answers
3k views

How to know if you're in a typescript?

I'm using the script command to save all the output from the terminal to a file called typescript. Or script foo to save to the file foo. Now, let's say I'm going along typing command after command ...
8
votes
1answer
211 views

How to best track adventures of a novice administrator

I have this user that has limited sudo privileges, yet he manages to screw up from time to time. I would like to keep an eye on his adventures, so that I can reverse any damage with less digging. ...
6
votes
1answer
2k views

Using scriptreplay without timing file

I used script to record a terminal session, but I accidentally deleted the timing file. Is it possible to use scriptreplay without the timing file, assuming some default typing speed or something ...
5
votes
2answers
914 views

'dos2unix' is unable to convert a `typescript` file to Unix format

I recorded my current session using the script command, and all information was saved in a typescript file, but when I opened it using Vim there were a lot of ^Ms due to carriage returns. I tried to ...
5
votes
2answers
2k views

Convert a typescript file to a list of commands (history)

I wanted to record a linux session so I could use it as documentation for a "how to install" guide. I found something on the internet that suggested that the script command would be good for this, and ...
4
votes
1answer
127 views

Open a new terminal, monitor it and execute a script

I have a script that I want to monitor its results and write them to a log file. I run the following: gnome-terminal -x bash -c "script logfile.log; ssh user@IP" But this command execute first the ...
3
votes
3answers
2k views

Why in the output of script (1) the newline is CR + LF (dos-style)?

In the typescript of script command (i.e. in the saved file), the newline is CR + LF (\r\n), although the original one (fed to script) is LF. Why? It seems it's tty issue, which I don't know at all. ...
3
votes
4answers
2k views

add timestamps to recorded session via “script” command

In my .bash_profile I have script -a -t 0 session.log which automatically records all terminal input/output into the session.log file. I know this command comes with an optional flag to record the ...
3
votes
1answer
195 views

Console logging using script command output unreadable

I wanted to log my program's (the python program boots up a headless embedded device connected to a serial port) output to a text file console_log.txt using a shell script, for which, I wrote the ...
3
votes
2answers
29 views

Logging shell sessions encrypted?

I log all my shell activity using script, but am worried that there are quite a few passwords and other secret stuff in these log files. Does anybody know of any way of logging the shell sessions in ...
2
votes
3answers
4k views

Garbage in bash session log file. (using script command)

I tried to log bash session using: js:/var/tmp # script -aqf /var/tmp/out In out file I see, besides output, a lot of garbage. Instead of just whitespaces and new lines I see this, for example: ...
2
votes
1answer
3k views

Converting asciinema output to gif

Can I convert a .json file; generated by a program like asciinema; into an animated .gif?
2
votes
0answers
63 views

How to make `script` start and end automatically when working in a certain directory?

I want to use the script program to record my session any time that I am working within a certain directory, such as my ~/projects directory. So for example, I would cd into ~/projects, and script ...
1
vote
1answer
903 views

Understanding scriptreplay timing file

I am trying to understand the timing files produced by the script command (which are supposed to be read by scriptreplay while running typescript files). The timing file is always made of two columns, ...
1
vote
1answer
281 views

Passing argument from a shell script to a new session

I'm writing a script to log serial data from an USB port to file and I'm using script and picocom to log the data as such: sudo script -a -c 'sudo picocom /dev/ttyUSB0 | ts "%Y-%b-%d %H:%M:%S10"' /...
1
vote
1answer
612 views

how can i automatically record every terminal session?

I like to use tools like history, script, and asciinema to record and review xterm (i.e. bash/sh) sessions for typical, general administration reasons, and also, sometimes for comprehensive study/...
1
vote
2answers
104 views

cd to original location when recording session with “script” command

I have script log.txt in my bash profile; that creates a new sub process and records my entire session to log.txt. When I press cmd+t to open a new terminal usually this will open one in the same ...
1
vote
0answers
22 views

Portable output from `script` [duplicate]

I have recorded my session which looks good on my terminal (when doing cat typescript), but shows gibberish everywhere else. Is it possibile to use knowledge of my terminal to produce a portable ...
0
votes
1answer
1k views

What is this sequence of control characters (M-bM-^TM-^@) (dashes)? How can I transform these? [closed]

I have a 'typescript' file that if i cat -v I get the following within the output: M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-...
0
votes
1answer
34 views

How to use existing terminal session to save output with ANSI escape code like `script` or `screen -L` do?

I run a python script on konsole to print long logging for few hours, then I realized I want to save its output with color, but it's too late to run either script or screen -L to save the output as ...
0
votes
1answer
44 views

“script” command saves unnecessary letters

When using script to save all of the terminal output, I see strange characters in the saved files, such as [K, [0m, [KM, [C to name a few. While I cat or more the file I don't seem to see this, it's ...
0
votes
1answer
2k views

Execute script in new tab command line gnome-terminal

i want to open a new terminal and execute a script immediately to it (to set a title in the new tab) and i cannot configure this. I try: gnome-terminal --tab-with-profile=$varname -x ./test.sh -c "...
0
votes
2answers
141 views

“Script” command for two terminals

I want to run script command such that it logs both the commands I type for the server and the client in one script file. How can I possibly do this ?