[Dovecot] Output of dovecot -a not sorted
Hey Timo,
I think I've asked you about this before, and I'm sure its not a big priority, but this is really a pain when trying to check default settings...
The output of dovecot -a is huge, and the fact that it is not sorted alphabetically (nor is dovecot -n, but thats not as big of a problem, although I'd like to see that sorted as well for consistency) makes it really difficult to find certain settings you are looking for.
Any chance of fixing this so it sorts the output alphabetically?
Thanks, and thanks for dovecot!
--
Best regards,
Charles
Charles Marcus wrote:
Hey Timo,
I think I've asked you about this before, and I'm sure its not a big priority, but this is really a pain when trying to check default settings...
The output of dovecot -a is huge, and the fact that it is not sorted alphabetically (nor is dovecot -n, but thats not as big of a problem, although I'd like to see that sorted as well for consistency) makes it really difficult to find certain settings you are looking for.
Any chance of fixing this so it sorts the output alphabetically?
I guess they are sorted logically.
you can use the perl script below:
# dovecot -n | /path/to/dovesort.pl auth default: mechanisms: ... ... .... verbose_proctitle: yes
======== #!/usr/bin/perl
use strict;
my %out = (); my $curline = "";
while (<>) { chomp; if (/^\S/) { $curline = $_; } elsif ($curline !~ /\S/) { print "$_\n"; next; } $out{$curline} .= "$_\n"; } close(DOVE);
foreach (sort keys %out) { print $out{$_}; }
participants (2)
-
Charles Marcus
-
mouss