Posted by: Pdfprep
Post Date: December 6, 2020
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