Linux Serial output on console messed up

I am aware of these three posts.

Using the DHT11 sensor, I get the -humidity-temperature- numbers. Problem is I get frequently get them messed up, like this:

while true; do cat < /dev/ttyACM0 | tail -n1; sleep 1; done
-35.00-22.00-
-35.00-22.00-
-35.00-22.00-
–22.00-
-35.00-22.00-35.00-22.00-
-35.00-22.00-
-35.00-22.00-
-35.00-22.00-
-3522.00-
-35.00-22.00-
-35.00-22.00-

On the other hand, when I use the IDE’s “Serial monitor” they show up perfectly:

-35.00-22.00-
-35.00-22.00-
-35.00-22.00-
-35.00-22.00-
-35.00-22.00-
-35.00-22.00-
-35.00-22.00-
-35.00-22.00-

How should I fix this?

How should I fix this?

Stay awake.

If this was my problem I would write a Python program to receive the data and call that with my shell script.

...R

guessing (since it's my 1st day with arduino) to set the sleep a bit longer.

I was having strange behavior in my temperature code (from the starter-kit book) and found re-uploading the file was necessary (like 3 times) and it diplayed all kinds of weirdness due to (perhaps) not being overwritten correctly, as it was still semi-running the knight-rider code in another shell that wasn't closed.... even though i did re-upload it...it worked after a few times.

well, that's my shot in the dark...
now i'm just trying to glean amap from the forum.