Browse code

Create usb_max_current-bus.sh

Stefan Höhn authored on25/09/2016 21:40:10 • GitHub committed on25/09/2016 21:40:10
Showing1 changed files

1 1
new file mode 100644
... ...
@@ -0,0 +1,7 @@
1
+#!/bin/bash
2
+zaehl=$(lsusb -s 001|wc -l)
3
+for (( i=1; i <= $zaehl; i++ ))
4
+do
5
+wert=$(lsusb -v -s $i: 2>&1 | grep MaxPower | sed 's/MaxPower//;s/mA//') 
6
+echo Bus $i $(dc <<< '[+]sa[z2!>az2!>b]sb'"${wert[*]}lbxp") mA 
7
+done