Sample Header Ad - 728x90

Why does script or watch output look weird in saved text files

1 vote
1 answer
81 views
I use the script command to save the whole session, but the output in the text file is something weird, and I opened it with the cat command in the terminal, and everything became ok. How can I save it in a text file that becomes readable? This also happened with the watch command. How to fix it? The following commands (individually) result in a.txt containing weird text:
watch date | tee a.txt
script a.txt ...
for example this is the out put of watch date | tee watch.txt enter image description here
Asked by Sorenyt Mikelyt (11 rep)
Aug 7, 2025, 12:31 AM
Last activity: Aug 7, 2025, 05:38 PM