Replace dynamic column
formatting with fixed format string
This commit is contained in:
parent
7d9abb1344
commit
2bfd478b72
2
nench.sh
2
nench.sh
@ -187,7 +187,7 @@ printf '\n'
|
|||||||
printf 'Disks:\n'
|
printf 'Disks:\n'
|
||||||
if command_exists lsblk
|
if command_exists lsblk
|
||||||
then
|
then
|
||||||
lsblk --nodeps --noheadings --output NAME,SIZE,ROTA --exclude 1,2,11 | sort | awk '{if ($3 == 0) {$3="SSD"} else {$3="HDD"}; print}' | column -t
|
lsblk --nodeps --noheadings --output NAME,SIZE,ROTA --exclude 1,2,11 | sort | awk '{if ($3 == 0) {$3="SSD"} else {$3="HDD"}; printf("%-3s%8s%5s\n", $1, $2, $3)}'
|
||||||
elif [ -r "/var/run/dmesg.boot" ]
|
elif [ -r "/var/run/dmesg.boot" ]
|
||||||
then
|
then
|
||||||
awk '/(ad|ada|da|vtblk)[0-9]+: [0-9]+.B/ { print $1, $2/1024, "GiB" }' /var/run/dmesg.boot
|
awk '/(ad|ada|da|vtblk)[0-9]+: [0-9]+.B/ { print $1, $2/1024, "GiB" }' /var/run/dmesg.boot
|
||||||
|
Loading…
x
Reference in New Issue
Block a user