Question: Unix Assignment Question 1. Explain the function of break and continue commands in UNIX/Linux. Question 2. Name two commands that are used in bash script
Unix Assignment
Question 1. Explain the function of break and continue commands in UNIX/Linux.
Question 2. Name two commands that are used in bash script to perform arithmetic calculations. Describe the difference between them.
Question 3. Explain what is happening in Lines 1, 4, 9, and 18. What is the output of this operation?
Line 01: $ x=5
Line 02: $ y=3
Line 03: $
Line 04: $ if [ $x -lt $y ]
Line 05: > then
Line 06: > echo " "
Line 07: > echo " ${x} is less than ${y}"
Line 08: > echo " "
Line 09: > elif [ $x -eq $y ]
Line 10: > then
Line 11: > echo " "
Line 12: > echo " ${x} is equal to ${y}"
Line 13: > echo " "
Line 14: > else
Line 15: > echo " "
Line 16: > echo " ${x} is greater than ${y}"
Line 17: > echo " "
Line 18> fi
Question 4. Which of the following programming constructs can be used in a bash shell script:
a. ifdo statement
b. case command
c. for...do loop
d. whiledo loop
e. untildone loop
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
