Improved bdmap output

master
BrainwreckedTech 3 years ago
parent 0f6348e0a1
commit 7e7284ea02

@ -9,8 +9,11 @@ BLK_INFO="$(echo "${BLK_INFO}" | sed 's|\.\.\/devices/pci[0-9a-f:]\{7\}\(/[0-9a-
# STRIP OFF THE SUPERFLUOUS USB HOST INFORMATION # STRIP OFF THE SUPERFLUOUS USB HOST INFORMATION
BLK_INFO="$(echo "${BLK_INFO}" | sed 's|\(usb[0-9]\+\)/.*/host|\1/host|g')" BLK_INFO="$(echo "${BLK_INFO}" | sed 's|\(usb[0-9]\+\)/.*/host|\1/host|g')"
# CONDENSE THE TARGET INFORMATION # STRIP OFF THE SUPERFLUOUS TARGET INFORMATION
BLK_INFO="$(echo "${BLK_INFO}" | sed 's|target[0-9:]\+/[0-9:]\+:\([0-9]\+\)|target\1|g')" BLK_INFO="$(echo "${BLK_INFO}" | sed 's|/target\([0-9]\+\):\([0-9]\+\):\([0-9]\+\)/|/|g')"
# EXPAND THE SCSI INFORMATION
BLK_INFO="$(echo "${BLK_INFO}" | sed 's|\([0-9]\+\):\([0-9]\+\):\([0-9]\+\):\([0-9]\+\)|ch\2/id\3/lun\4|g')"
# STRIP OFF BLOCKS # STRIP OFF BLOCKS
BLK_INFO="$(echo "${BLK_INFO}" | sed 's|/block/.*||g')" BLK_INFO="$(echo "${BLK_INFO}" | sed 's|/block/.*||g')"

Loading…
Cancel
Save