PdfPrep.com

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

Which of the following examples shows the general structure of a for loop in a shell script?
A . for *.txt as file => echo $file
B . for *.txt ( echo $i )
C . for file in *.txt
do
echo $i
done

D . for ls *.txt exec {} ;
E . foreach @{file} {
echo $i
}

Answer: C