I would like to store an interface name into a variable in linux shell script. I found a solution to do this via "grep" command and the IP-Address. My problem is that my interface doesn't have an IP-Address at this moment.
The interface name always begins with "enx" and the MAC-Address like "enxb2240be99fc3" while the MAC-Address can change every reboot.
Is there a solution to get this interface name into a shell script variable?