I have to extract from the command hcitool dev only the MAC address of the bluetooth dongle.
Output of hcitool dev is:
Devices:
hci0 xx:xx:xx:xx:xx:xx
I write this output to a file and try to get the info with awk:
hcitool dev > /home/pi/mario/BT.txt
awk ' { print $2 } ' /home/pi/mario/BT.txt
The output also contains the first row which is an empty cell:
xx:xx:xx:xx:xx:xx
How can I put off the first cell?