In a file called ifcfg-eth0 there is a line which states HWADDR=XX:XX:XX:XX:XX
I have a script called "gatherdata" and have set a variable called "HWADDR" and I want the variable to be set to XX:XX:XX:XX:XX
Is there an easy way of doing this? ive had a look on google and have seen the source command but couldn't find a good example to fit my scenario.
Im on CentOS 6.8
Thanks