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!
I did some further testing today and could not reproduce the problem! It looks like the original file might have been edited on the source machine and accidentally saved with DOS line-ends. I edited new and old test files on the Haiku box and there were no problems! Case closed I think.