This is my whole script
#!/bin/bash
num_autocorellation=1
index_min=1
index_max=5000
for first in {1..10000..100}
do
for index in {$index_min..$index_max}
do
awk 'NR==FNR{a[$0]++;next}a[$0]-->0' eq3_900_915_dgdg_$first.ndx eq3_900_915_dgdg_$index.ndx | tee eq4_${num_autocorellation}_900_915_dgdg_$index.ndx
done
index_min=$(($index_min+100))
index_max=$(($index_max+100))
num_autocorellation=$(($num_autocorellation+1))
done
I want to have in the beginning in my nested loop something like that
for index in {1..5000}
do
awk 'NR==FNR{a[$0]++;next}a[$0]-->0' eq3_900_915_dgdg_1.ndx eq3_900_915_dgdg_$index.ndx | tee eq4_1_900_915_dgdg_$index.ndx
done
Then after this for loop will end I want to have
for index in {100..5100}
do
awk 'NR==FNR{a[$0]++;next}a[$0]-->0' eq3_900_915_dgdg_1.ndx eq3_900_915_dgdg_$index.ndx | tee eq4_2_900_915_dgdg_$index.ndx
done
and again again until 10000 in that loop
for first in {1..10000..100}
But I have a problem in this part
for index in {$index_min..$index_max}
Instead of integer I have in the file something like that
eq4_1_900_905_dgdg_{1..5000}.ndx
but I want to have
eq4_1_900_905_dgdg_1.ndx
So how to put here
for index in {$index_min..$index_max}
int variables?