I need to write a quick bash script that asks the user which mac address should be used as a variable in the rest of the script. I can get the mac addresses using the following
ip addr | grep ether | cut -d ' ' -f6
After this, I’m not sure how to make an array of the given data, since this will depend on each machine, and then ask the user which one to choose based on an integer as input.
You can use select