[bash] How can I remove all text after a character in bash?