Quantcast
Channel: Multimediaforum
Viewing all articles
Browse latest Browse all 4603

Consolenausgabe filtern

$
0
0
Hallo, ich hoffe die Frage ist nicht allzu blöd, aber ich hab sie halt.

Ich habe folgende Konsolenausgabe des Befehls 'lshw -c network':
Code:

root@host:~# lshw -c network
  *-network:0
      description: Wireless interface
      physical id: 1
      logical name: wlan0
      serial: 98:3b:16:1e:e5:91
      capabilities: ethernet physical wireless
      configuration: broadcast=yes driver=wl driverversion=0 multicast=yes wireless=IEEE 802.11
  *-network:1
      description: Ethernet interface
      physical id: 2
      logical name: eth0
      serial: 02:ce:04:c1:af:d7
      size: 1Gbit/s
      capacity: 1Gbit/s
      capabilities: ethernet physical tp aui bnc mii fibre 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
      configuration: autonegotiation=on broadcast=yes driver=sunxi_gmac driverversion=SUNXI GMAC driver V0.1 duplex=full ip=192.168.178.2 link=yes multicast=yes port=MII speed=1Gbit/s
  *-network:2 DISABLED
      description: Ethernet interface
      physical id: 3
      logical name: bond0
      capabilities: ethernet physical
      configuration: broadcast=yes driver=bonding driverversion=3.7.1 firmware=2 link=no master=yes multicast=yes
  *-network:3 DISABLED
      description: Wireless interface
      physical id: 4
      logical name: p2p0
      serial: 9a:3b:16:1e:e5:91
      capabilities: ethernet physical wireless
      configuration: broadcast=yes driver=p2p driverversion=0 multicast=yes wireless=IEEE 802.11bgn

Aus dieser Ausgabe benötige ich den 'serial'-wert aus der zeile direkt nach 'eth0'.
Wie kann ich die und nur die herrausfiltern?

Schonmal vielen Dank für die Antworten.

MfG Spider.Mann

Edit:
Das ist nicht die MAC-Adresse, aber ich möchte diesen Wert dazu benutzen.

Viewing all articles
Browse latest Browse all 4603