Can someone explain how I can use variable names in bash for a loop to generate a sequence of numbers?
for year in {1990..1997} do echo ${year} done
Results:
1990 1991 1992 1993 1994 1995 1996 1997 1997
but
year_start=1990 year_end=1997 for year in {${year_start}..${year_end}} do echo ${year} done
Results:
{1990..1997}
How can I do a second job? otherwise I have to write tiring while loops. Thank you very much.
source share