Python for Network Engineers

Using Linux grep command

By George El. • October 2018 • Reading time: 2 minutes

grep is a utility that allows you to print lines that match certain patterns $ ifconfig eth0 eth0 Link encap:Ethernet HWaddr fc:aa:14:01:cd:41 inet addr:192.168.1.73 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 RX bytes:0 (0.0 B) TX bytes:0 (0.