Had an issue with the ‘^M’ characther in some files causing unwanted line breaks. Got some help from colleagues pointing out that it is a Windows line break. But – how to remove it in my bash script? Easy to do using TR told me, but no. Added
tmp="$(echo ${mLine} | tr -d '^M')"
but no luck…after some struggle it turned out that I could not just write ^M, I had to add it to the script using CTRL + V, then immediately followed by CTRL+V. Using VI as the editor that was what I needed to do to add the newline character to my script.