FreeBSD rc.conf to rc.conf.d one liner
cat rc.conf | awk -F _ '{print $1}' | sort | uniq | xargs -I % sudo sh -c "grep ^% rc.conf >> rc.conf.d/%"
Results may vary. Will handle basic SERVICE_* names …
cat rc.conf | awk -F _ '{print $1}' | sort | uniq | xargs -I % sudo sh -c "grep ^% rc.conf >> rc.conf.d/%"
Results may vary. Will handle basic SERVICE_* names …