Create lsusb_id
This commit is contained in:
parent
42446b010d
commit
3c18458663
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev); do
|
||||
(
|
||||
syspath="${sysdevpath%/dev}"
|
||||
devname="$(udevadm info -q name -p $syspath)"
|
||||
[[ "$devname" == "bus/"* ]] && continue
|
||||
eval "$(udevadm info -q property --export -p $syspath)"
|
||||
[[ -z "$ID_SERIAL" ]] && continue
|
||||
echo "/dev/$devname - $ID_SERIAL"
|
||||
)
|
||||
done
|
Loading…
Reference in New Issue