aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Pipkin <d4wnr4z0r@yahoo.com>2012-05-13 19:20:38 -0500
committerJacob Pipkin <d4wnr4z0r@yahoo.com>2012-05-13 19:20:38 -0500
commit4a12c1a1629ec18db06583ad0ac503e3c1e34605 (patch)
tree18655dde65fac0cc26e7971bce801fb2e965a760
parentd7f4c572cc1f740be5d8be89fd72045d48028175 (diff)
downloadsbotools2-4a12c1a1629ec18db06583ad0ac503e3c1e34605.tar.xz
make sboconfig -l sort the output
-rwxr-xr-xsboconfig5
1 files changed, 3 insertions, 2 deletions
diff --git a/sboconfig b/sboconfig
index 0319e4e..be17718 100755
--- a/sboconfig
+++ b/sboconfig
@@ -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";
}
}