I wanted to append a new line to the end of a file, but some of the files I'm working with may not contain newline characters as their last character, which means I'm appending onto the same line.
Is there an easy way to check for newline characters, and adjust accordingly?
echo "some line of text" >> aFile.txt