From f0d46a64408731fcc64b591fef98a27e1f7fa4ee Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:41:54 -0400 Subject: [PATCH] Improve disk printing and layout --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 8f01dfe..7582c37 100755 --- a/install.sh +++ b/install.sh @@ -34,10 +34,10 @@ done disks="$( for disk in /dev/sd?; do - gdisk_data="$( gdisk -l ${disk} 2>/dev/null )" + disk_data="$( fdisk -l ${disk} 2>/dev/null )" echo -n "${disk}" - echo -n "\t$( grep "^Model:" <<<"${gdisk_data}" | awk '{ $1=""; print $0 }' )" - echo -n "\t$( grep "^Disk ${disk}:" <<<"${gdisk_data}" | awk '{ $1=$2=""; print $0 }' )" + echo -en "\t$( grep "^Disk model:" <<<"${disk_data}" | awk '{ $1=""; print $0 }' )" + echo -en " $( grep "^Disk ${disk}:" <<<"${disk_data}" | awk '{ $1=""; $2="size:"; print $0 }' )" echo done )"