In /usr/bin/usb-devices line 11:
	if [ -f $file ]; then
                ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	if [ -f "$file" ]; then


In /usr/bin/usb-devices line 12:
		echo "S:  $name=`cat $file`"
                                ^---------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                                     ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		echo "S:  $name=$(cat "$file")"


In /usr/bin/usb-devices line 17:
	local class=$1		# v4: in hex
        ^---------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/usb-devices line 47:
	local eppath=$1
        ^----------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/usb-devices line 49:
	addr=`cat $eppath/bEndpointAddress`
             ^----------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                  ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	addr=$(cat "$eppath"/bEndpointAddress)


In /usr/bin/usb-devices line 50:
	attr=`cat $eppath/bmAttributes`
             ^------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                  ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	attr=$(cat "$eppath"/bmAttributes)


In /usr/bin/usb-devices line 51:
	dir=`cat $eppath/direction`
            ^---------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                 ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	dir=$(cat "$eppath"/direction)


In /usr/bin/usb-devices line 52:
	eptype=`cat $eppath/type`
               ^----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                    ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	eptype=$(cat "$eppath"/type)


In /usr/bin/usb-devices line 53:
	maxps_hex="0x`cat $eppath/wMaxPacketSize`"
                     ^--------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                          ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	maxps_hex="0x$(cat "$eppath"/wMaxPacketSize)"


In /usr/bin/usb-devices line 55:
	maxps=`printf "%4i*%s\n" $(($maxps_hex & 0x7ff)) \
              ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                                    ^--------^ SC2004: $/${} is unnecessary on arithmetic variables.
                                                                                                 ^--------^ SC2004: $/${} is unnecessary on arithmetic variables.

Did you mean: 
	maxps=$(printf "%4i*%s\n" $(($maxps_hex & 0x7ff)) \
				$((1 + (($maxps_hex >> 11) & 0x3))))


In /usr/bin/usb-devices line 57:
	interval=`cat $eppath/interval`
                 ^--------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                      ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	interval=$(cat "$eppath"/interval)


In /usr/bin/usb-devices line 60:
		$addr $dir $attr $eptype "$maxps" $interval
                ^---^ SC2086: Double quote to prevent globbing and word splitting.
                      ^--^ SC2086: Double quote to prevent globbing and word splitting.
                           ^---^ SC2086: Double quote to prevent globbing and word splitting.
                                 ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                                  ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		"$addr" "$dir" "$attr" "$eptype" "$maxps" "$interval"


In /usr/bin/usb-devices line 64:
	local ifpath=$1
        ^----------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/usb-devices line 66:
	ifnum=`cat $ifpath/bInterfaceNumber`
              ^----------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                   ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	ifnum=$(cat "$ifpath"/bInterfaceNumber)


In /usr/bin/usb-devices line 67:
	altset=`cat $ifpath/bAlternateSetting`
               ^-----------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                    ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	altset=$(cat "$ifpath"/bAlternateSetting)


In /usr/bin/usb-devices line 68:
	numeps=`cat $ifpath/bNumEndpoints`
               ^-------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                    ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	numeps=$(cat "$ifpath"/bNumEndpoints)


In /usr/bin/usb-devices line 69:
	class=`cat $ifpath/bInterfaceClass`
              ^---------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                   ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	class=$(cat "$ifpath"/bInterfaceClass)


In /usr/bin/usb-devices line 70:
	subclass=`cat $ifpath/bInterfaceSubClass`
                 ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                      ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	subclass=$(cat "$ifpath"/bInterfaceSubClass)


In /usr/bin/usb-devices line 71:
	protocol=`cat $ifpath/bInterfaceProtocol`
                 ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.
                      ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	protocol=$(cat "$ifpath"/bInterfaceProtocol)


In /usr/bin/usb-devices line 72:
	if [ -L $ifpath/driver ]; then		# v4: allow for no driver
                ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	if [ -L "$ifpath"/driver ]; then		# v4: allow for no driver


In /usr/bin/usb-devices line 73:
		driver=`readlink $ifpath/driver`
                       ^-----------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                                 ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		driver=$(readlink "$ifpath"/driver)


In /usr/bin/usb-devices line 74:
		driver=`basename "$driver"`
                       ^------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
		driver=$(basename "$driver")


In /usr/bin/usb-devices line 78:
	classname=`class_decode $class`
                  ^-------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                                ^----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	classname=$(class_decode "$class")


In /usr/bin/usb-devices line 80:
		0x${ifnum#0} ${altset#0} ${numeps#0} $class "$classname" $subclass \
                  ^--------^ SC2086: Double quote to prevent globbing and word splitting.
                             ^---------^ SC2086: Double quote to prevent globbing and word splitting.
                                         ^---------^ SC2086: Double quote to prevent globbing and word splitting.
                                                     ^----^ SC2086: Double quote to prevent globbing and word splitting.
                                                                         ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		0x"${ifnum#0}" "${altset#0}" "${numeps#0}" "$class" "$classname" "$subclass" \


In /usr/bin/usb-devices line 81:
		$protocol $driver
                ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		"$protocol" $driver


In /usr/bin/usb-devices line 83:
	for endpoint in $ifpath/ep_??
                        ^-----^ SC2231: Quote expansions in this for loop glob to prevent wordsplitting, e.g. "$dir"/*.txt .


In /usr/bin/usb-devices line 85:
		if [ -L $endpoint ]; then	# v4: verify endpoint exists
                        ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		if [ -L "$endpoint" ]; then	# v4: verify endpoint exists


In /usr/bin/usb-devices line 86:
			print_endpoint $endpoint
                                       ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
			print_endpoint "$endpoint"


In /usr/bin/usb-devices line 92:
	local devpath=$1
        ^-----------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/usb-devices line 93:
	local parent=$2
        ^----------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/usb-devices line 94:
	local level=$3
        ^---------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/usb-devices line 95:
	local count=$4
        ^---------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/usb-devices line 97:
	[ -d $devpath ] || return
             ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	[ -d "$devpath" ] || return


In /usr/bin/usb-devices line 98:
	cd $devpath
        ^---------^ SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
           ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	cd "$devpath" || exit


In /usr/bin/usb-devices line 100:
	local busnum=`cat busnum`
        ^----------^ SC2039: In POSIX sh, 'local' is undefined.
              ^----^ SC2155: Declare and assign separately to avoid masking return values.
                     ^----------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	local busnum=$(cat busnum)


In /usr/bin/usb-devices line 101:
	local devnum=`cat devnum`
        ^----------^ SC2039: In POSIX sh, 'local' is undefined.
              ^----^ SC2155: Declare and assign separately to avoid masking return values.
                     ^----------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	local devnum=$(cat devnum)


In /usr/bin/usb-devices line 103:
	if [ $level -gt 0 ]; then
             ^----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	if [ "$level" -gt 0 ]; then


In /usr/bin/usb-devices line 108:
	speed=`cat speed`
              ^---------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	speed=$(cat speed)


In /usr/bin/usb-devices line 109:
	maxchild=`cat maxchild`
                 ^------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	maxchild=$(cat maxchild)


In /usr/bin/usb-devices line 111:
		$busnum $level $parent $port $count $devnum $speed $maxchild
                ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                        ^----^ SC2086: Double quote to prevent globbing and word splitting.
                               ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                             ^----^ SC2086: Double quote to prevent globbing and word splitting.
                                                    ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                                            ^----^ SC2086: Double quote to prevent globbing and word splitting.
                                                                   ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		"$busnum" "$level" "$parent" $port "$count" "$devnum" "$speed" "$maxchild"


In /usr/bin/usb-devices line 113:
	ver=`cat version`
            ^-----------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	ver=$(cat version)


In /usr/bin/usb-devices line 114:
	devclass=`cat bDeviceClass`
                 ^----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	devclass=$(cat bDeviceClass)


In /usr/bin/usb-devices line 115:
	devsubclass=`cat bDeviceSubClass`
                    ^-------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	devsubclass=$(cat bDeviceSubClass)


In /usr/bin/usb-devices line 116:
	devprotocol=`cat bDeviceProtocol`
                    ^-------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	devprotocol=$(cat bDeviceProtocol)


In /usr/bin/usb-devices line 117:
	maxps0=`cat bMaxPacketSize0`
               ^-------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	maxps0=$(cat bMaxPacketSize0)


In /usr/bin/usb-devices line 118:
	numconfigs=`cat bNumConfigurations`
                   ^----------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	numconfigs=$(cat bNumConfigurations)


In /usr/bin/usb-devices line 119:
	classname=`class_decode $devclass`
                  ^----------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                                ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	classname=$(class_decode "$devclass")


In /usr/bin/usb-devices line 121:
		$ver $devclass "$classname" $devsubclass $devprotocol \
                ^--^ SC2086: Double quote to prevent globbing and word splitting.
                     ^-------^ SC2086: Double quote to prevent globbing and word splitting.
                                            ^----------^ SC2086: Double quote to prevent globbing and word splitting.
                                                         ^----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		"$ver" "$devclass" "$classname" "$devsubclass" "$devprotocol" \


In /usr/bin/usb-devices line 122:
		$maxps0 $numconfigs
                ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                        ^---------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		"$maxps0" "$numconfigs"


In /usr/bin/usb-devices line 124:
	vendid=`cat idVendor`
               ^------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	vendid=$(cat idVendor)


In /usr/bin/usb-devices line 125:
	prodid=`cat idProduct`
               ^-------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	prodid=$(cat idProduct)


In /usr/bin/usb-devices line 126:
	revmajor=`cat bcdDevice | cut -c 1-2`
                 ^--------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                      ^-------^ SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.

Did you mean: 
	revmajor=$(cat bcdDevice | cut -c 1-2)


In /usr/bin/usb-devices line 127:
	revminor=`cat bcdDevice | cut -c 3-4`
                 ^--------------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                      ^-------^ SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.

Did you mean: 
	revminor=$(cat bcdDevice | cut -c 3-4)


In /usr/bin/usb-devices line 129:
		$vendid $prodid $revmajor $revminor
                ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                        ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                ^-------^ SC2086: Double quote to prevent globbing and word splitting.
                                          ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		"$vendid" "$prodid" "$revmajor" "$revminor"


In /usr/bin/usb-devices line 135:
	numifs=`cat bNumInterfaces`
               ^------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	numifs=$(cat bNumInterfaces)


In /usr/bin/usb-devices line 136:
	cfgnum=`cat bConfigurationValue`
               ^-----------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	cfgnum=$(cat bConfigurationValue)


In /usr/bin/usb-devices line 137:
	attr=`cat bmAttributes`
             ^----------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	attr=$(cat bmAttributes)


In /usr/bin/usb-devices line 138:
	maxpower=`cat bMaxPower`
                 ^-------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

Did you mean: 
	maxpower=$(cat bMaxPower)


In /usr/bin/usb-devices line 140:
		$numifs $cfgnum $attr $maxpower
                ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                        ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                ^---^ SC2086: Double quote to prevent globbing and word splitting.
                                      ^-------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		"$numifs" "$cfgnum" "$attr" "$maxpower"


In /usr/bin/usb-devices line 145:
	for interface in $busnum-*:?.*
                         ^-----^ SC2231: Quote expansions in this for loop glob to prevent wordsplitting, e.g. "$dir"/*.txt .


In /usr/bin/usb-devices line 147:
		print_interface $devpath/$interface
                                ^------^ SC2086: Double quote to prevent globbing and word splitting.
                                         ^--------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		print_interface "$devpath"/"$interface"


In /usr/bin/usb-devices line 150:
	local devcount=0
        ^------------^ SC2039: In POSIX sh, 'local' is undefined.


In /usr/bin/usb-devices line 151:
	for subdev in $busnum-*
                      ^-----^ SC2231: Quote expansions in this for loop glob to prevent wordsplitting, e.g. "$dir"/*.txt .


In /usr/bin/usb-devices line 156:
		devcount=$(($devcount + 1))
                            ^-------^ SC2004: $/${} is unnecessary on arithmetic variables.


In /usr/bin/usb-devices line 157:
		if [ -d $devpath/$subdev ]; then
                        ^------^ SC2086: Double quote to prevent globbing and word splitting.
                                 ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
		if [ -d "$devpath"/"$subdev" ]; then


In /usr/bin/usb-devices line 158:
			print_device $devpath/$subdev \
                                     ^------^ SC2086: Double quote to prevent globbing and word splitting.
                                              ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
			print_device "$devpath"/"$subdev" \


In /usr/bin/usb-devices line 159:
				$devnum $(($level +1)) $devcount
                                ^-----^ SC2086: Double quote to prevent globbing and word splitting.
                                           ^----^ SC2004: $/${} is unnecessary on arithmetic variables.

Did you mean: 
				"$devnum" $(($level +1)) $devcount


In /usr/bin/usb-devices line 171:
	print_device $device 0 0 0
                     ^-----^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
	print_device "$device" 0 0 0

For more information:
  https://www.shellcheck.net/wiki/SC2039 -- In POSIX sh, 'local' is undefined.
  https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ...
  https://www.shellcheck.net/wiki/SC2164 -- Use 'cd ... || exit' or 'cd ... |...