I'm using a Raspberry Pi with a Serial device connected over USB (/dev/ttyACM0).
I can write the data to the console with cat /dev/ttyACM0
.
But when I try to replace the $ signs in the output with a newline cat /dev/ttyACM0 | sed 's/\$/\n/g'
i get no output.
When I write the output of cat
to a file and then replace the $
signs with cat file | sed 's/\$/\n/g'
it works.
Is there any option for sed that it will work?