I'm trying to do a nested loop, one of which is indexing an array, but I also want to iterate through a custom list of strings, which happen to be only the letters C and I, nothing inbetween. My question is, what is the proper syntax for looping through this custom list of letters/strings? I saw some people use brackets{} to specify, what am I doing wrong?
abc=(thing1 thing2 thing3 thing4)
for j in C I; do
for i in 0 1 2 3; do
echo "grep 'ITEM_${abc[i]}' /folder1/folder2/THING_$jS_$i.sorted/585_10$jS_$i.sorted.gtf"
done
done
echothere.$jS_when you want${j}S_?