Oslab 6

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 20

Operating system lab

Lab Journal 6
Name: __Areej Fatima______________

Enrollment #: _ 01-135201-012 ___________

Class/Section: ___BSIT-4B_________________

Tasks: Give answers to the following.

1) Execute all the commands & add screenshots in your Lab Journal?
2) Take four numbers from the user and write shell script to find the greatest and the smallest
number?
3) Write a shell script to perform the given operations using case
Addition
Subtraction
Multiplication
Division
Modulo
Square root using sqrt function
Your script should perform the above operations on decimal numbers as well (Take
inputs from the user)
4) Take inputs (Integer values) from the user and perform using and check the following
conditions
X!=Y
Z==0
Age>21
X*Y<Z+1
If the condition is true, your script should print “Condition is True”
5) Take three strings from the user and concatenate them. Write shell script?

6) Write a shell script to generate Fibonacci Series. Your script should take one value from the user
and till that value generate the series.
7) Write a script to print the following pyramid (Using nested loop)
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4 5 6
1 2 3 4 5 6 7
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10
Submitted to:
Tasks:
Date:
Total marks:

You might also like