Exercises. Part 4

fructose.dat    glucose.dat   sucrose.dat

What is the output of:

for datafile in *.dat
do    
    ls *.dat
done
for sugar in *.dat
do
    echo $sugar
    cat $sugar > xylose.dat
done
  1. Prints fructose.dat, glucose.dat, and sucrose.dat, and copies sucrose.dat to create xylose.dat.
  2. Prints fructose.dat, glucose.dat, and sucrose.dat, and concatenates all three files to create xylose.dat.
  3. Prints fructose.dat, glucose.dat, sucrose.dat, and xylose.dat, and copies sucrose.dat to create xylose.dat.
  4. None of the above.

$ expr 3 + 5
8
$ expr 30 / 5 - 2
4

Given this, what is the output of:

for left in 2 3
do
    for right in $left
    do
        expr $left + $right
    done
done