Fix multiple spaces in ls
output's datetimes
This commit is contained in:
parent
d24fe1f1c4
commit
0f6348e0a1
2
bdmap
2
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')"
|
||||
|
Loading…
x
Reference in New Issue
Block a user