sort gnt-disks-models by size
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 17 Feb 2020 17:36:55 +0000 (18:36 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 17 Feb 2020 17:37:24 +0000 (18:37 +0100)
gnt-disks.sh

index 8be6876..56c0ca1 100755 (executable)
@@ -2,5 +2,5 @@
 
 gnt-cluster command -M lsblk --scsi -m | grep -v '^return' | tee /dev/shm/gnt-disks | grep -v cdrom
 
-gnt-cluster command -M lsblk --scsi --output SIZE,MODEL --noheadings | grep -v '^return' | grep -v '^----*$' | tee /dev/shm/gnt-disk-size-model | cut -d: -f2- | sort | uniq -c
+gnt-cluster command -M lsblk --scsi --output SIZE,MODEL --noheadings | grep -v '^return' | grep -v '^----*$' | tee /dev/shm/gnt-disk-size-model | cut -d: -f2- | sort | uniq -c | sort -k2 -n | tee /dev/shm/gnt-disks-models