Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

man script says:

Certain interactive commands, such as vi(1), create garbage in the type‐ script file. Script works best with commands that do not manipulate the screen, the results are meant to emulate a hardcopy terminal.

I tried this out, starting a script session and then launching vim, and there do appear to be control characters in the output. Replaying the typescript also left some control characters on my command line after scriptreplay had finished.

However, it did mostly work, even correctly capturing a vim session with a split window. The rogue control characters seem to be a slight annoyance rather than a fundamental issue. So is there a program similar to script that works without this annoyance?

share|improve this question
    
I would say you were VERY lucky that script worked as we as it did for you. It's design intent was to capture console output. –  nelsonov Sep 23 '14 at 8:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.