diff options
author | Jacob Pipkin <d4wnr4z0r@yahoo.com> | 2012-05-13 19:20:38 -0500 |
---|---|---|
committer | Jacob Pipkin <d4wnr4z0r@yahoo.com> | 2012-05-13 19:20:38 -0500 |
commit | 4a12c1a1629ec18db06583ad0ac503e3c1e34605 (patch) | |
tree | 18655dde65fac0cc26e7971bce801fb2e965a760 | |
parent | d7f4c572cc1f740be5d8be89fd72045d48028175 (diff) | |
download | sbotools2-4a12c1a1629ec18db06583ad0ac503e3c1e34605.tar.xz |
make sboconfig -l sort the output
-rwxr-xr-x | sboconfig | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -50,8 +50,9 @@ show_usage () and exit (0) if exists $options{h}; show_version () and exit (0) if exists $options{v}; if (exists $options{l}) { - while (my ($key,$value) = each %config) { - print "$key=$value\n"; + my @keys = sort {$a cmp $b} keys %config; + for my $key (@keys) { + print $config{$key}=$config{$value},"\n"; } } |