Gentoo: You want to have all USE-flags including comments in your make.conf? No problem, just do this: # perl -ne 'next if(m/^(#|\s)/); s/^([^\s]+) ?-? ?(.+)/USE="\1 $USE" # \2/; print' < /usr/portage/profiles/use.desc >> /etc/make.conf