Handle non-printing chars in bash