Post date: Apr 13, 2011 1:10:16 PM
1. Define Shell Script, Shell Variable, and program control flow commands.
2. What’s the output of the following shell script “compare” if we run “sh compare 11 8”? ______________
if [$1 –lt $2]
then
echo “$1 is smaller!”
exit 1
else
echo “$1 is bigger!”
exit 0
fi
3. Write a shell script "countv" that takes the side of a cube as a command line argument and displays the volume of the cube.
Submit your answers to 360 Dropbox for Assignment 11.