Shell Scripting Tutorial for Beginners 19 - FOR loop

preview_player
Показать описание
for Loops: Sometimes we want to run a command (or group of commands) over and over. This is called iteration, repetition, or looping. The most commonly used shell repetition structure is the for loop, which has the general form:
for variable in list
do
command(s)
done

★★★Top Online Courses From ProgrammingKnowledge ★★★

★★★ Online Courses to learn ★★★

★★★ Follow ★★★

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
Рекомендации по теме
Комментарии
Автор

for increment, if you are still using bash 3 like me
you can use this :
for i in `seq 1 2 10`
do
echo $i
done

mingyan
Автор

thank you sir we are supporting you from delhi india

AJAYSHARMA-gbqw
Автор

Why its not working on kali linux? Different compatible issues?

morningstar
Автор

sir last pattern not working the increment
for ((i=0; i<5; i+2))

ZohaibKhan-pzsu
Автор

using for loop read a file is not working:
for j in a2.txt a1.txt
do
echo $j
done
This code not reading a file content
a1, a2.txt is file name

krishnansrinivasan