linux shell print for loop code example
Example 1: bash for loop
for VARIABLE in file1 file2 file3
do
command1 on $VARIABLE
command2
commandN
done
Example 2: bash script loop
while [ <some test> ]
do
<commands>
done
for VARIABLE in file1 file2 file3
do
command1 on $VARIABLE
command2
commandN
done
while [ <some test> ]
do
<commands>
done