I am sending a dbus-send command which returns something like :
method return sender=:1.833 -> dest=:1.840 reply_serial=2
array of bytes [
00 01 02 03 04 05
]
int 1
boolean true
The "array of bytes" size is dynamic an can contains n values.
I store the result of the dbus-send command in an array by using :
array=($(dbus-send --session --print-repl ..readValue))
I want to be able to retrieve the values contained into the array of bytes and be able to display one or all of them if necessary like this :
data read => 00 01 02 03 04 05
or
first data read => 00
First data is always reachable by {array[10]} and I think is it possible to use a structure like :
IFS=" " read -a array
for element in "${array[@]:10}"
do
...
done
Any thoughts on how to accomplish this?