Answers for "bash for loop step"

7

loop bash

years=(2018 2019)
days=(74 274)

for year in "${years[@]}"; do
    for day in $(seq -w ${days[0]} ${days[1]}); do
               echo $year
               echo $day
    done
done
Posted by: Guest on April-13-2020
1

bash for loop step

for i in `seq 0 2 10`; do echo $i; done
Posted by: Guest on April-02-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language