From 0f6348e0a1f89811e9c94dd035a31f87c6b928b5 Mon Sep 17 00:00:00 2001 From: BrainwreckedTech <3752022+BrainwreckedTech@users.noreply.github.com> Date: Wed, 5 Jan 2022 08:55:00 -0500 Subject: [PATCH] Fix multiple spaces in `ls` output's datetimes --- bdmap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bdmap b/bdmap index 1782d1c..8f48ba1 100755 --- a/bdmap +++ b/bdmap @@ -1,7 +1,7 @@ #!/bin/sh # GET THE INITITAL OUTPUT OF `ls /sys/block` -BLK_INFO="$(ls -l --color=never /sys/block | grep -v virtual | grep devices | cut -d\ -f9-)" +BLK_INFO="$(ls -l --color=never /sys/block | grep -v virtual | grep devices | sed 's/ \+/ /g' | cut -d\ -f9-)" # STRIP OFF THE PCI BUS LOCATION INFORMATION BLK_INFO="$(echo "${BLK_INFO}" | sed 's|\.\.\/devices/pci[0-9a-f:]\{7\}\(/[0-9a-f:.]\{12\}\)\+/||g')"