From a3e506e2ccfb5e968217ea77f269a612a62fb9d0 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Sat, 25 Dec 2021 20:13:15 -0300 Subject: [PATCH] Use cut --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 65f412e..87dcee0 100755 --- a/install.sh +++ b/install.sh @@ -29,7 +29,8 @@ showDisks() { formatOptions $(lsblk -d -p -n -l -o NAME,SIZE -e 7,11) result=$(whiptail --title "Select a disk" --menu "" 0 0 0 "${options[@]}" 3>&1 1>&2 2>&3) - disk=${result%%\ *} + disk=$(echo $result | cut -d' ' -f1) + echo $disk } partDisks() { @@ -217,4 +218,4 @@ runScript() { finishInstallation } -# runScript \ No newline at end of file +runScript \ No newline at end of file