#! /bin/bash nc0=$(lshw -class network | grep -E 'Ethernet interface|logical name' | grep 'logical name' | awk '{print $3}' | awk '!/vir/' | tail -n1) echo $nc0 'is chosen as the eth0, internal network port. To modify /etc/sysconfig/network-scripts/ifcfg-"$nc" in the frontend.' echo '' ls /etc/sysconfig/network-scripts/ifcfg-$nc0