Skip to content

Instantly share code, notes, and snippets.

@eruffaldi
Last active September 28, 2016 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eruffaldi/7de9e8c8081d82f3425a5da814ef3aa0 to your computer and use it in GitHub Desktop.
Save eruffaldi/7de9e8c8081d82f3425a5da814ef3aa0 to your computer and use it in GitHub Desktop.
#!/bin/bash
IFS=$'\n'
a=''
for i in $( IFS=$'\n' lsusb | grep 045e: ); do
IFS=' :' read -r -a array <<< "$i"
a="${a} --device /dev/bus/usb/${array[1]}/${array[3]}"
done
echo $a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment