This is command: pdc status -a 2>&1 | grep 'okay'
It gives the following output
[okay ]: you are currently listening: 33
[okay ]: you are currently listening: 22
[okay ]: you are currently listening: 11
I have written this command in shell scrip file. But I want to store the output of this command into the array for some processing on each of the index value in the array.
How can I store the output of this command into the array?
mapfile -t array < <(grep.....)
– Sachith Muhandiram May 03 '17 at 11:52