Ubuntu – grep's output is split by colon when being saved into array
I have a file with array looking like { [commandA]: cmdA, [commandB]: cmdB, ... } I'd like to fetch the lines with commands by grep and store them in the bash array. But when I do cmdFunMap=(`grep "^ [command" myfile`)…