title: Appending a new line to a file, checking whether last character is a newline character or not in Bash
body: <p>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.</p>
  
  <p>Is there an easy way to check for newline characters, and adjust accordingly?</p>
  
  <p><code>echo "some line of text" &gt;&gt; aFile.txt</code></p>