This did job for me cat typescript | ansi2txt | col -bp > typescript.txt.bp cat -v typescript.txt.bp