Bug#400725: release-notes: How to view logs generated by 'script'?
On Tue, Nov 28, 2006 at 04:31:35PM +0100, Nikolaus Schulz wrote:
> IMO there really should exist a utility to strip such ANSI control
> sequences. The best I've found so far is a small program by James
> Carlson, see the usenet thread "VT100 to text utility" at .
Hm, sorry, I should have noted that this utility (which the author
christened 'novt') isn't enough here, because it is limited to filtering
out vt100 control sequences; but the attached bash snippet from my ~/bin
completes the job nicely.
> Hmm, Joey, do you think something like this would qualify for moreutils?
>  http://groups.google.com/group/comp.terminals/msg/1fdc79377950d045
# unscript: clean up typescripts.
# 'novt' is by James Carlson.
# sed/tr pipeline from a ksh script by Robert Katz.
# (No, 'col -b' doesn't do it.)
novt "$@" |
t x" |
tr -dc '[:print:]\t\n'