web-dev-qa-db-fra.com

Lors de l'utilisation de la commande lsusb, existe-t-il un moyen d'obtenir uniquement le nom du périphérique?

Lorsque j'utilise la commande lsusb, j'obtiens:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Existe-t-il de toute façon uniquement le nom de l'appareil, c'est-à-dire.

Linux Foundation 2.0 root hub
VMware, Inc. Virtual USB Hub
VMware, Inc. Virtual Mouse
Linux Foundation 1.1 root hub
2
RamPage
lsusb | cut -c34-

montrerait ce dont vous avez besoin.

$ lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 04f2:b3fd Chicony Electronics Co., Ltd 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ lsusb | cut -c34-
Intel Corp. 
Linux Foundation 2.0 root hub
Intel Corp. 
Linux Foundation 2.0 root hub
Linux Foundation 3.0 root hub
Chicony Electronics Co., Ltd 
Linux Foundation 2.0 root hub
2
Rinzwind