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//gremembering to escape the
^Mwith^Vor just use
dos2unix typescript