Skip to content

Commit

Permalink
Fix #17 Bug on Error Occurred While LSUSB -T (#18)
Browse files Browse the repository at this point in the history
Signed-off-by: LanikSJ <[email protected]>
  • Loading branch information
LanikSJ authored Dec 10, 2023
1 parent 0ce94ab commit 49055ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lsusb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ verbose() {
}

version() {
echo "lsusb for macOS 1.1.1"
echo "lsusb for macOS 1.1.2"
}

help() {
Expand Down Expand Up @@ -62,6 +62,7 @@ parse() {

# Get the bus number. It's the first two hex digits of the Location ID.
# We'll convert to decimal later
# shellcheck disable=SC2001
bus_num=$(echo "$location" | sed -e 's/^..\(..\).*/\1/;')
if [[ -z $bus_num ]]; then
bus_num="00"
Expand Down Expand Up @@ -280,7 +281,7 @@ tree() {

# Now strip off leading Location ID and print to stdout.
for line in $treedata; do
"${line//^...........//}"
echo -e "$line"
done

# Restore the IFS
Expand Down

0 comments on commit 49055ab

Please sign in to comment.