for loop in shell script
for i in {1..5}
do
echo "Welcome $i times"
done
for loop in shell script
for i in {1..5}
do
echo "Welcome $i times"
done
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
bash for loop
for VARIABLE in file1 file2 file3
do
command1 on $VARIABLE
command2
commandN
done
For loop in shell script
for i in `seq 1 10`
do
echo $i #Do something here.
done
for loop iteration in shell script
#!/bin/bash
START=1
END=5
echo "Countdown"
for (( c=$START; c<=$END; c++ ))
do
echo -n "$c "
sleep 1
done
echo
echo "Boom!"
bash script loop
while [ <some test> ]
do
<commands>
done
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us