\x0d
is the character \r
which brings the cursor to the start of the line, then \x20
is a space, so it overwrites the a
with a space. If you're on a unix-y system you may want to consider just removing \r
from your output/file since it's not needed if it's for text output. The \n
"implies" it for *nix, but not for Windows.
↧
Answer by Eric Renouf for bash - why does \x0d\x20 erase the line
↧