From 828c05218408908331397e5e3609b7a28f49aa0b Mon Sep 17 00:00:00 2001 From: krisdoodle45 <86745210+krisdoodle45@users.noreply.github.com> Date: Fri, 24 Sep 2021 16:35:49 +0200 Subject: [PATCH] We don't need sed here (#1006) --- .local/bin/dmenuumount | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/dmenuumount b/.local/bin/dmenuumount index f7d0747..946d12c 100755 --- a/.local/bin/dmenuumount +++ b/.local/bin/dmenuumount @@ -26,7 +26,7 @@ asktype() { \ esac } -drives=$(lsblk -nrpo "name,type,size,mountpoint,label" | sed 's/ /:/g' | awk -F':' '$4!~/\/boot|\/efi|\/home$|SWAP/&&length($4)>1{printf "%s (%s) %s\n",$4,$3,$5}') +drives=$(lsblk -nrpo "name,type,size,mountpoint,label" | awk -F':' '{gsub(/ /,":")}$4!~/\/boot|\/efi|\/home$|SWAP/&&length($4)>1{printf "%s (%s) %s\n",$4,$3,$5}') if ! grep simple-mtpfs /etc/mtab; then [ -z "$drives" ] && echo "No drives to unmount." && exit