I have the following code:
#!/bin/bash
SECTION[1]="900px"
PATH[1]="/path/to/folder"
SECTION[2]="1080px"
PATH[2]="/patj/to/folder2"
SECTION[3]="3000px"
PATH[3]="/patj/to/folder3"
for i in {1..3}
do
echo "${SECTION[$i]}"
echo "${PATH[$i]}"
done
How can I make the for loop iterate through the number of sections?
I tried:
for i in {1.."${#SECTION[@]}"}
But I get an operand expected error.