ifconfig | grep ether | cut -d " " -f 10
This is how I am trying to get the ether but I am on this for about 2 hours trying to understand why I am selecting 10th column to cut out when ether is on 2nd column.
I'm just trying to understand
ifconfig | grep ether | cut -d " " -f 10
This is how I am trying to get the ether but I am on this for about 2 hours trying to understand why I am selecting 10th column to cut out when ether is on 2nd column.
I'm just trying to understand
Try
ifconfig | grep ether | sed 's/^[[:space:]]*//g' | cut -d " " -f 2
This will remove leading whitespace as per this SO-link and then you can use a single space as delimiter.