Assignment 08 Shell
Assignment 08 Shell
1. Write a shell script that prints “Shell Scripting is Fun!” on the screen. Modify the
shell script above to include a variable. The variable will hold the contents of the
message “Shell Scripting is Fun!”.
2. Print the values of the environment variables HOME, USER, SHELL and PATH
with set, print env and echo.
3. Store the output of the command “hostname” in a variable. Display “This script is
running on _.” where “_” is the output of the “hostname” command.
4. Get two numbers a and b from user using read statement. Do the following:
a. Add the two numbers
b. Subtract the numbers
c. Multiply the numbers
d. Divide the numbers
Print the result.
5. Get length and breadth for a rectangle and radius for a circle using command line
argument. Calculate area and perimeter of the rectangle and also area and
circumference of a circle. Use the special character data types and display the
arguments using them.