I am trying to write a shell script. In the script I am trying to execute multiple commands one by one.
My requirement is I want to collect output of each line to an array. How can I do this?
arr = command1
arr = command2
arr[n] = commandn
If the below can be achieved then that will be better.
arr[comm] = command1
arr[comm] = command2
arr[comm][n] = commandn