LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   script's typescript output is littered with ANSI strings (https://www.linuxquestions.org/questions/linux-software-2/scripts-typescript-output-is-littered-with-ansi-strings-4175662468/)

mrmazda 10-13-2019 04:18 AM

script's typescript output is littered with ANSI strings
 
Regardless which distro I use, ANSI sequences litter typescript files, which makes them hard to read, and hard to copy and paste from. Is there a way to have the ANSI sequences omitted? If not, is there some simple way to strip them? Is there a better utility to capture screen output?

ondoho 10-13-2019 04:41 AM

Quote:

Originally Posted by mrmazda (Post 6046459)
Regardless which distro I use, ANSI sequences litter typescript files, which makes them hard to read, and hard to copy and paste from. Is there a way to have the ANSI sequences omitted? If not, is there some simple way to strip them? Is there a better utility to capture screen output?

Quote:

TypeScript is a language for application scale JavaScript development
Now I understand even less.
What exactly is happening?
Where do these files come from, how are you reading them, what "ANSI sequences" are you seeing, and what put those sequences in there?

mrmazda 10-13-2019 04:47 AM

Code:

# which script
/usr/bin/script
# rpm -qf /usr/bin/script
util-linux-2.33.1-lp151.3.3.2.x86_64

Quote:

DESCRIPTION
script makes a typescript of everything displayed on your terminal

ondoho 10-13-2019 06:11 AM

I see.
The way I understand it, this is the normal and desired behaviour.
Problem: I cannot replay the typescript with "scriptreplay typescript".
In any case, 'cat typescript' works as expected.
Also take a look at this:
https://unix.stackexchange.com/quest...-script-output

mrmazda 10-14-2019 01:50 AM

That's a long, involved thread. "scriptreplay typescript" here always generates a line 1 unexpected format error. Redirecting cat output to a file doesn't seem to produce much less ansi string litter.


All times are GMT -5. The time now is 01:29 AM.