QuestionQ38

VerifiedThe Power of the Command Line

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

Explanation

A shell for loop iterates a variable over a list using the syntax for variable in list; do ...; done. The glob *.txt supplies the list of matching files, and do and done delimit the loop body.

Community Discussion

No comments yet. Be the first to start the discussion!