for VARIABLE in 1 2 3 4 5 .. N
do
command1
command2
commandN
done
#!/bin/bash
for i in {1..5}
do
echo "Welcome $i times"
done
#!/bin/bash
for i in $(seq begin step end)
do
echo "Welcome $i times"
done
seqはfor i in 'seq 1 10' のように書いて、from〜toの値を順に+1して返す。'seq 1 2 10'と書くと1〜10で増分+2を表す。