1
0
Fork 0
mirror of https://github.com/snovvcrash/usbrip.git synced 2024-05-21 22:46:06 +02:00
usbrip/quick/a.sh
2020-01-12 21:27:07 +03:00

1 line
352 B
Bash

o=`journalctl -o short-iso-precise|grep -iw usb|grep -iwe 'Product:\|Manufacturer:\|SerialNumber:\|USB disconnect'|awk '{$3=" ";print $0}'|sed s/" "/" "/`;p=`echo "$o"|cut -d'.' -f1`;echo "$o"|while read -r line;do c=`echo "$line"|awk '{print $1}'|cut -d'.' -f1`;if [[ "$c" != "$p" ]];then p="$c";echo;fi;echo "$c `echo $line|cut -d' ' -f2-100`";done