Skip to main content
Formatting
Source Link
AdminBee
  • 23.6k
  • 25
  • 55
  • 77

I use

env TERM=dumb SHELL=/bin/bash script

leaves you with a typescript file with a bunch of ^M^M but I just remove those with vi

:1,$s/^M//g

remembering to escape the ^M with ^V

or just use

dos2unix typescript
  • with vi

    :1,$s/^M//g
    

    remembering to escape the ^M with ^V

  • or just use

    dos2unix typescript
    

I use

env TERM=dumb SHELL=/bin/bash script

leaves you with a typescript file with a bunch of ^M but I just remove those with vi

:1,$s/^M//g

remembering to escape the ^M with ^V

or just use

dos2unix typescript

I use

env TERM=dumb SHELL=/bin/bash script

leaves you with a typescript file with a bunch of ^M but I just remove those

  • with vi

    :1,$s/^M//g
    

    remembering to escape the ^M with ^V

  • or just use

    dos2unix typescript
    
Source Link

I use

env TERM=dumb SHELL=/bin/bash script

leaves you with a typescript file with a bunch of ^M but I just remove those with vi

:1,$s/^M//g

remembering to escape the ^M with ^V

or just use

dos2unix typescript