remove newline at the end of command output