https://devhubby.com/thread/how-to-remove-the-last-character-of-a-string-in-bash