chomp hostname command

hostname command returns \n at the end.