summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve McIntyre <steve@einval.com>2023-10-30 12:32:08 +0000
committerSteve McIntyre <steve@einval.com>2023-10-30 12:32:08 +0000
commitdab831621b8a90e7ea9ace737d29fa0a4f17bf39 (patch)
treed49ad669b31db4b839de755da7776e5c1259cf46
parent3b2d3a9ca1b31b23f784816142affb09d0d60366 (diff)
downloadsteve-scripts-dab831621b8a90e7ea9ace737d29fa0a4f17bf39.zip
disk-details: improve output format
-rwxr-xr-xdisk-details2
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-details b/disk-details
index 49e9776..03dbf3b 100755
--- a/disk-details
+++ b/disk-details
@@ -14,7 +14,7 @@ print_capacity () {
sg_readcap ${DEVICE} | perl -e '
while (<STDIN>) {
chomp;
- m/Device size:.*\s+(\S+\s+GB)/ and print "$1\n";
+ m/Device size:.*\s+(\S+\s+GB)/ and printf("%11.11s\n", $1);
}'
}