From 1a36d88c652470f2cf55ab51dbd3f06fb6402f5a Mon Sep 17 00:00:00 2001
From: "Alan J. Pippin" <ajp@pippins.net>
Date: Sun, 2 Mar 2008 08:17:38 -0700
Subject: [PATCH] Increased width of zfs filesystem column. Output sorted by
 filesystem now.

---
 zfs-snapshot-totals | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/zfs-snapshot-totals b/zfs-snapshot-totals
index 53bcd7b..09abb74 100755
--- a/zfs-snapshot-totals
+++ b/zfs-snapshot-totals
@@ -29,18 +29,18 @@ foreach $snapshot (@snapshots)
   }
 }
 
-printf "%-20s %-15s %-10s\n","ZFS Filesystem","Snapshots Size","Num Snapshots";
-printf "%-20s %-15s %-10s\n","--","--","--";
-foreach $key (keys %totals)
+printf "%-30s %-15s %-10s\n","ZFS Filesystem","Snapshots Size","Num Snapshots";
+printf "%-30s %-15s %-10s\n","--","--","--";
+foreach $key (sort keys %totals)
 {
   $size = $totals{$key}{size};
   $total_size += $size;
   $total_snapshots += $totals{$key}{snapshots};
   $size = &adjust_size($size);
-  printf "%-20s %-15s %-10s\n", $key, $size, $totals{$key}{snapshots};
+  printf "%-30s %-15s %-10s\n", $key, $size, $totals{$key}{snapshots};
 }
 
 $total_size = &adjust_size($total_size);
-printf "%-20s %-15s %-10s\n","--","--","--";
-printf "%-20s %-15s %-10s\n","Total Snapshots",$total_size,$total_snapshots;
+printf "%-30s %-15s %-10s\n","--","--","--";
+printf "%-30s %-15s %-10s\n","Total Snapshots",$total_size,$total_snapshots;
 
-- 
2.34.1