I tried to log bash session using:
js:/var/tmp # script -aqf /var/tmp/out
In out file I see, besides output, a lot of garbage. Instead of just whitespaces and new lines I see this, for example:
Script started on Tue Jul 14 14:17:57 2015
^[[?1034h^[[1m^[[31mjs-om:/var/tmp # ^[(B^[[m^M
^[[1m^[[31mjs:/var/tmp # ^[(B^[[m^M
^[[1m^[[31mjs:/var/tmp # ^[(B^[[m^M
^[[1m^[[31mjs:/var/tmp # ^[(B^[[m^M
^[[1m^[[31mjs:/var/tmp # ^[(B^[[m^M
^[[1m^[[31mjs:/var/tmp # ^[(B^[[mpwd^M
/var/tmp^M
^[[1m^[[31mjs:/var/tmp # ^[(B^[[m^M
^[[1m^[[31mjs:/var/tmp # ^[(B^[[m^M
^[[1m^[[31mjs:/var/tmp # ^[(B^[[m^M
^[[1m^[[31mjs:/var/tmp # ^[(B^[[m^M
^[[1m^[[31mjs:/var/tmp # ^[(B^[[mexit^M
exit^M
I think the problem is with encodings. Is there a solution for this issue?