Those are terminal escape sequences, to be interpreted by the terminal driver. As the output from the program is being saved to a file, the (minicom) program rather erroneously dumping the escape sequences too without checking where it's STDOUT is going.
To get rid of the escape sequences, using sed to remove the lines that contain 23;80H, dry-run:
sed '/23;80H/d' file.txt
Modification:
sed -i '/23;80H/d' file.txt
If you wish to keep a backup with an extension e.g. .bak, do:
The command you're executing (
minicom
) is using "VT100 Escape Sequences" to do cursor positioning.To remove the characters listed above, pipe the file through
I got the Escape by typing Ctrl-VEsc.
Those are terminal escape sequences, to be interpreted by the terminal driver. As the output from the program is being saved to a file, the (
minicom
) program rather erroneously dumping the escape sequences too without checking where it's STDOUT is going.To get rid of the escape sequences, using
sed
to remove the lines that contain23;80H
, dry-run:Modification:
If you wish to keep a backup with an extension e.g.
.bak
, do:This happens because you haven't set character encoding of output file to UTF-8.
Answer obtained from this stackoverflow link