I want to save each output filepath to a variable and then grep through them to find the timestamp. I want to lable each variable by adding the nodeId from the node list I am looping through. When I try this with the following code I get an error
output1_1: command not found
nodeList=('1_1' '1_6' '2_1' '2_6')
for i in "${nodeList[@]}"
do
output${i}=$CWD/output/abc${i}.txt
times${i}=$(grep -m 1 '\"path\":' $output${i}| sed 's/.*timestampUtc\"://g' | sed 's/,.*//g')
done