para loop no script de shell
for i in {1..5}
do
echo "Welcome $i times"
done
Cruel Capybara
for i in {1..5}
do
echo "Welcome $i times"
done
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
for ((i = 1; i <= 10 ; i++)); do
echo $i
done
for i in `seq 0 2 10`; do echo $i; done
for var in value1 value2 value3
do
command1 on $var
command2
commandN
done
#!bin/bash
for i in {1..5}
do
echo i:$i
done