#!/bin/bash

for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev)
do
  syspath="${sysdevpath%/dev}"
  echo ${syspath}
  devname="$(udevadm info -q name -p $syspath)"
  echo ${devname}
  [[ "$devname" == "bus/"* ]] && continue
  eval "$(udevadm info -q property --export -p $syspath)"
  [[ -z "$ID_SERIAL" ]] && continue
  echo " $ID_SERIAL:/dev/$devname"
done
