perl -pe 's/"\s*$/ transparent_hugepage=never"/ if /^GRUB_CMDLINE_LINUX=/ && !/transparent_hugepage/' filename