Remove \n on stdout and stderr command