010-160 Exam QuestionsBrowse all questions from this exam

010-160 Exam - Question 17


FILL BLANK -

What keyword is used in a shell script to begin a loop? (Specify one keyword only, without any additional information.)

Show Answer
Correct Answer:

In a shell script, to begin a loop, you can use either the 'for' or 'while' keyword. Both are valid as they are used to initiate loops under different conditions.

Discussion

10 comments
Sign in to comment
Rolland
Feb 12, 2021

Either "for" or "while" should be valid answers for this question.

AA
Jan 28, 2020

while ?

Peetha
Jan 29, 2020

I think they are talking about the general term "loop", a while is a conditional loop

MIU
Nov 10, 2020

please know the difference of while and for...

blvanre
Mar 18, 2021

to begin a loop is the question so FOR is the correct answer.

Vovanich
Dec 20, 2022

for i in {1..5..1} do echo"...................." done exit 0

james2033
Aug 5, 2023

"without any additional information" --> it is "for", not "while" keyword.

BehemothX
Jun 20, 2020

I thought it was while too

linvidia
Oct 26, 2022

The keyword: FOR

leila_123
Dec 25, 2021

is not do? until... do.... done, for ... do.. done, while ... do...done I think is do

shimij1000
Nov 1, 2022

for or while