Hopefully this will help someone …,
So this afternoon I wasted an hour or so when I was attempting to use one of my Linux bash scripts copied over to Haiku-OS. Basically it collects some system info into environment variables and then sends a payload with these values off to my mosquitto MQTT server. I can then monitor the client from anywhere. I used nano as an editor.
I ran the script and got all sorts of weird errors, such as “null value … missing” and truncated variable values. I adjusted parameters and turned echoing to screen on, and found that “/r” was being inserted and causing problems. It was then that I noticed that nano seemed to adding DOS line-ends. I installed and ran dos2unix which fixed the problem! I now need to check the nano line-end settings to avoid the problem in future. Hope this helps!