Published on April 9, 2017 by ProgrammingKnowledge
Want create site? Find Free WordPress Themes and plugins.

FOR loop to execute commands. A list of commands is executed for each value in the list.
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

My Website – www.codebind.com
My Blog – goo.gl/Nd2pFn
My Facebook Page – goo.gl/eLp2cQ
Google+ – goo.gl/lvC5FX
Twitter – twitter.com/ProgrammingKnow
Pinterest – goo.gl/kCInUp
Text Case Converter – goo.gl/pVpcwL
Epoch Timestamp Converter – goo.gl/Zedjo5
Decimal – Binary – Hexadecimal Converter – goo.gl/rkX3JE
8-bit Checksum Calculator – goo.gl/inxvIT

Did you find apk for android? You can find new Free Android Games and apps.

Leave a Reply

11 Comments on "Shell Scripting Tutorial for Beginners 20 – use FOR loop to execute commands"

Notify of
avatar

Nilesh D
Guest
Nilesh D
1 month 26 days ago

nice vdo,and concept explain very well

IGOR Fast
Guest
IGOR Fast
4 months 21 days ago

Kind time of day. My name is Magomed. I am the beginning web the programmer. And I learn the Python and C++ programming language, I have learned 30%. The personal computer (the laptop or the computer) is necessary for me for further training as I should pass to training by means of the program. I have no means for purchase of the personal computer (the laptop or the computer.) I ask you help to save up means for purchase of the personal computer. Each kopek is important. My requisites: QIWI +79888124842+79888195960My vk – m.vk.com/feedWhattsApp +79888124842Thanks

IGOR Fast
Guest
IGOR Fast
4 months 21 days ago
Доброе время суток. Меня зовут Мага. Я начинающий веб программист. И я учу язык программирования "Python" и "C++" , я выучил 30 %.Для дальнейшего обучения мне необходим ПК (ноутбук или компьютер) так как мне надо переходить на обучение с помощью программы. У меня нет средств для покупки ПК (ноутбука или компьютера.) Прошу вас помогите накопить средства для покупки ПК. Важна каждая копейка. Мои реквизиты : QIWI +79888124842 +79888195960Мой vk — m.vk.com/feedWhattsApp +79888124842СпасибоKind time of day. My name is Magomed. I am the beginning web the programmer. And I learn the Python and C++ programming language, I have learned 30%. The… Read more »
nazareth garate
Guest
nazareth garate
4 months 30 days ago

hi there, please hekp me i saw a video in your channel about NumberPicker how can i retrieve the value from a numberPiker inside a cardview when i push a button?, I know there is a TextWacher, but there is not such a thing for numberPicker, so what can i do please?

En Route
Guest
En Route
5 months 5 days ago

this is a humble request sir. please make a video on audio programming and building audio related applications (like audacity) for Windows that involve DFT, FFT etc.I will be grateful to you.

Squidgy Testicle
Guest
Squidgy Testicle
5 months 10 days ago

It failed mainly because you didn't add quotes around the variables. Ex:for FILE in *; { [ -f "$FILE" ] && echo "$FILE"; }By the way, that's alternative syntax for a for loop, but handy as it's shorter. That works in bash. In zsh, you can omit the last colon and needn't have space after and before the first and last brace, respectively.Another variant is the c style:for {I=0;I<=10;I++}; { echo $I; }You may have seen that in an awk for loop:awk 'BEGIN{for(I=0;I<=10;I++) print(I)}'

Gurpreet Singh
Guest
Gurpreet Singh
5 months 11 days ago

nice job sir can you make a video on how to send message from computer to multiple no. in one time in the name of institution like school without showing number

xploit
Guest
xploit
5 months 13 days ago

thanks brother for your greats helpfull videos and eplaintation.can you brother eplain us how to to deploy website(not only for localhost) but brother in internet,i tried to publish my site using IIS(WIN 7);but i can not find it out of localhost .i use wifi and win 7 and i want that my site will be deploy on internet that i can find it over internet.please brother help me.thanks a lot of

Formation Sport Nature Évolution
Guest
Formation Sport Nature Évolution
5 months 14 days ago

Excellent ! I like the video (blue finger) Many thanks for this interesting video

AJAY SHARMA
Guest
AJAY SHARMA
5 months 14 days ago

thank you sir for you help!

wpDiscuz