nerdexam
LPI

010-160 · Question #90

Which of the following examples shows the general structure of a for loop in a shell script?

Sign in or unlock 010-160 to reveal the answer and full explanation for question #90. The question stem and answer options stay visible for context.

The Power of the Command Line

Question

Which of the following examples shows the general structure of a for loop in a shell script?

Options

  • Afor * .txt == file => echo $file
  • Bfor * .txt ( echo $i )
  • Cfor file in *.txt do echo $i done
  • Dfor ls *.txt exec {} ;
  • Eforeach @(file) { echo $i }

Unlock 010-160 to see the answer

You've previewed enough free 010-160 questions. Unlock 010-160 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#for loop#shell scripting#bash syntax#control flow
Full 010-160 Practice