Questions tagged [typescript]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

How to capture one image (screenshot) from asciinema?

How can I extract one asciinema image from a video, i.e. make a "screenshot"? As an output file I want a file with all ansi codes etc. My aim then is to convert it to HTML to then convert ...
1
vote
1answer
182 views

Shell Upgrade: script typescript command using bash

Can anyone explain what this means: SHELL=/bin/bash script -q /dev/null It is used to upgrade a shell in a CTF in HTB: SHELL=/bin/bash script -q /dev/null Ctrl-Z stty raw -echo fg reset xterm ...
3
votes
2answers
40 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 ...
0
votes
1answer
61 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 ...
6
votes
3answers
2k 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 ...
1
vote
0answers
23 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
2k 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
48 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 ...
1
vote
1answer
300 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"' /...
3
votes
1answer
264 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 ...
4
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. ...
2
votes
1answer
4k views

Converting asciinema output to gif

Can I convert a .json file; generated by a program like asciinema; into an animated .gif?
1
vote
1answer
687 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/...
0
votes
1answer
3k 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 "...
4
votes
1answer
144 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 ...
1
vote
2answers
106 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 ...
4
votes
4answers
3k 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 ...
1
vote
1answer
1k 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, ...
2
votes
0answers
65 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 ...
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 ...
8
votes
1answer
230 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. ...
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: ...
0
votes
2answers
162 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 ?
11
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 ...
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 ...
6
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 ...
76
votes
14answers
51k 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) ...