Stefan Esser <[email protected]> wrote in <[email protected]>:
se> Sorting works just fine for this purpose, at least on my rc.conf files. se> But I do not use loops or other control structures, just simple variable se> initializations in them. And I do not use the sorted file as actual se> rc.conf file, just look for differences between files. se> se> A utility that compares rc.conf files might be very useful and I think se> that should be a valuable addition to sysrc. E.g. a function to compare se> /etc./rc.conf with a template file, to compare two rc.conf files and to se> list differences in diff style, or to "grep" lines selected by a se> template file out of rc.conf, etc. Agreed. I received the same kind of requests from a company that I am working with. To compare rc.conf variables between two machines is difficult because the configurations come from various sources. It is also difficult to know which is the default value and which is configured. I am working on this issue in parallel, so another proposal will be posted separately later. se> > I will try to create another patch to support a separator other than se> > a newline, anyway. se> se> Dirk Engling suggested to use white space as separator and to interpret se> "inet" and "inet6" as (optional) AF indicators. I like this idea a lot! Okay. I do not stick to a way with multiple lines. Thank you for your feedback. -- Hiroki
pgpg3gW0IOBVR.pgp
Description: PGP signature
