I want to collect values to a array in C using system().
With:
hcidump -a | egrep 'RSSI|bdaddr' | grep -A1 --no-group-separator 'bdaddr 78:A5:04:17:9F:66' | grep -Po 'RSSI:\s+\K.*'
an output like that:
-25
-24
-23
-26
-26
and want to store that values in an array in C, but that's not possible, I assume, with:
system("hcidump -a | egrep 'RSSI|bdaddr' | grep -A1 --no-group-separator 'bdaddr 78:A5:04:17:9F:66' | grep -Po 'RSSI:\s+\K.*'");
Has anybody an idea if there is a command to achieve that? or a workaroung? My only idea is to write the data into a file and afterwards read the information out of it, but I would like to have a better approch.
Best regards Adrian