bash remove trailing newline from variable