in reply to string gets front truncated

I think that the answer is that you have a (one or more) "\r"s (0x13) in your file. So, it prints part of the file, return the (ancient term warning)carriage control cursor to the left, and then prints over what it has already printed.

Try running tr[\r][]d; on it before you print it out.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."