Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
7 views
2 pages
Assignment 3
Uploaded by
sreejeet17111995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF, TXT or read online on Scribd
Download now
Download
Save Assignment 3 For Later
Download
Save
Save Assignment 3 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
7 views
2 pages
Assignment 3
Uploaded by
sreejeet17111995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF, TXT or read online on Scribd
Download now
Download
Save Assignment 3 For Later
Carousel Previous
Carousel Next
Download
Save
Save Assignment 3 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 2
Search
Fullscreen
Assignment 3
1. Write a shell program to find the given number is even or odd
using if statement.
Script :
echo "Enter a number "
read a
if (( $a%2==0 ))
then
echo "The entered number is even"
fi
if (( $a%2!=0))
then
echo "The entered number is odd"
fi
2. Write a shell program to find the given number is even or odd
using if statement.
Script :
echo "Enter a number"
read a
if (( $a%2==0 ))
then
echo "The number is even"
else
echo "The number is odd"
fi
3. Write a shell program to find grade systems using if-elif-else
statement.
Script :
echo "Enter a mask "
read mask
if (( $mask>85 && $mask<=100 ))
then
echo "Congrats! you scored grade A"
elif (( $mask>60 && $mask <=85 ))
then
echo "You scored grade B+"
elif (( $mask>40 && $mask <=60 ))
then
echo "You scored grade B"
elif (( $mask>30 && $mask <=40 ))
then
echo "You scored grade C"
else
echo "Sorry you fail"
fi
4. Write a shell program to find the person is eligible for voting or
not using nested if statement.
Script :
echo "Enter a number"
read a
if (($a <= 15))
then
if (($a == 10))
then
echo "Play cricket"
else
echo "Play Football"
fi
else
echo "Play Kabaddi"
fi
5. Write a shell program to make calculator using switch case
statement.
Script :
echo "Enter two number "
read a
read b
echo "Enter your choice"
echo "1. Addition"
echo "2. Subtraction"
echo "3. Multiplication"
echo "4. Division"
echo "5. Reminder"
read ch
case $ch in
1) res=`expr $a + $b`;;
2) res=`expr $a - $b`;;
3) res=`expr $a \* $b`;;
4) res=`expr $a / $b`;;
5) res=`expr $a % $b`;;
esac
echo "result : $res"
You might also like
Linux Program and Commands
PDF
No ratings yet
Linux Program and Commands
16 pages
Os Ass3
PDF
No ratings yet
Os Ass3
18 pages
Shell Programming 185253
PDF
No ratings yet
Shell Programming 185253
22 pages
Practical 10(10)
PDF
No ratings yet
Practical 10(10)
8 pages
22203A0032 OSY Practical 10
PDF
No ratings yet
22203A0032 OSY Practical 10
8 pages
Ex: 2 Shell Programming Objectives
PDF
No ratings yet
Ex: 2 Shell Programming Objectives
13 pages
OS Lab Manual 06 07
PDF
No ratings yet
OS Lab Manual 06 07
62 pages
Notes: Sample Source Codes For Programming in Shell For Unix
PDF
No ratings yet
Notes: Sample Source Codes For Programming in Shell For Unix
9 pages
Os Lab Manual New 11.05.23
PDF
No ratings yet
Os Lab Manual New 11.05.23
53 pages
Linux Practicals
PDF
No ratings yet
Linux Practicals
6 pages
Assignment 2
PDF
No ratings yet
Assignment 2
8 pages
Lab Report 2
PDF
No ratings yet
Lab Report 2
11 pages
Shell Programming: Text Editors
PDF
No ratings yet
Shell Programming: Text Editors
22 pages
Sem5Linux
PDF
No ratings yet
Sem5Linux
10 pages
Os Lab
PDF
No ratings yet
Os Lab
33 pages
UNIX ASSIGNMENT (1) 20 Pages
PDF
No ratings yet
UNIX ASSIGNMENT (1) 20 Pages
20 pages
Os Lab 2 - Shell Scripting
PDF
No ratings yet
Os Lab 2 - Shell Scripting
6 pages
AAR Shell Programming
PDF
No ratings yet
AAR Shell Programming
13 pages
Lab Problems #1
PDF
No ratings yet
Lab Problems #1
2 pages
Operating System Lab Journal 6: Title: Linux Shell Programming II
PDF
No ratings yet
Operating System Lab Journal 6: Title: Linux Shell Programming II
7 pages
School of Information Technology and Engineering B.Tech It Information Technolgy Opearting Systems - Ite 209
PDF
No ratings yet
School of Information Technology and Engineering B.Tech It Information Technolgy Opearting Systems - Ite 209
2 pages
update unix program bca6th sem
PDF
No ratings yet
update unix program bca6th sem
6 pages
Os Ass2
PDF
No ratings yet
Os Ass2
8 pages
Simple Interest Calculation: Program Coding
PDF
No ratings yet
Simple Interest Calculation: Program Coding
23 pages
foss exp-4
PDF
No ratings yet
foss exp-4
3 pages
Task 2
PDF
No ratings yet
Task 2
12 pages
adp 2
PDF
No ratings yet
adp 2
10 pages
AAT 2
PDF
No ratings yet
AAT 2
6 pages
Shell
PDF
No ratings yet
Shell
50 pages
Shell Programming With Linux
PDF
No ratings yet
Shell Programming With Linux
18 pages
Linux Homework Answer
PDF
No ratings yet
Linux Homework Answer
8 pages
Unix 04
PDF
No ratings yet
Unix 04
60 pages
Os Lab
PDF
No ratings yet
Os Lab
29 pages
SHELL SCRIPT_
PDF
No ratings yet
SHELL SCRIPT_
7 pages
linux_practical_new
PDF
No ratings yet
linux_practical_new
46 pages
Unix Command Guide Planner Wise Part 1
PDF
No ratings yet
Unix Command Guide Planner Wise Part 1
12 pages
Lab-Journal-3 OF OS
PDF
No ratings yet
Lab-Journal-3 OF OS
16 pages
OSlab2222
PDF
No ratings yet
OSlab2222
5 pages
os_ptatical_solution
PDF
No ratings yet
os_ptatical_solution
10 pages
Unix Shell Programming Solved
PDF
No ratings yet
Unix Shell Programming Solved
14 pages
Shell Scripts1
PDF
No ratings yet
Shell Scripts1
4 pages
Simple C Programs
PDF
No ratings yet
Simple C Programs
10 pages
OS Lab Programs 2019
PDF
No ratings yet
OS Lab Programs 2019
22 pages
"Linux Shell Scripting Lab": Bachelor of Technology IN
PDF
No ratings yet
"Linux Shell Scripting Lab": Bachelor of Technology IN
20 pages
Operating System Lab: Presented By: Abhishek Ghosh Cse 3 Year Roll - 38
PDF
No ratings yet
Operating System Lab: Presented By: Abhishek Ghosh Cse 3 Year Roll - 38
17 pages
ShellProgramming
PDF
No ratings yet
ShellProgramming
2 pages
Pgms
PDF
No ratings yet
Pgms
6 pages
She'll Programs
PDF
No ratings yet
She'll Programs
15 pages
Sirifort Institute of Management Studies: Guru Gobind Singh Indraprastha University Sector 16 C, Dwarka, Delhi, India
PDF
No ratings yet
Sirifort Institute of Management Studies: Guru Gobind Singh Indraprastha University Sector 16 C, Dwarka, Delhi, India
30 pages
[OS] LAB 3 template
PDF
No ratings yet
[OS] LAB 3 template
9 pages
Unix Lab Programs: Exercise No:2. ODD OR EVEN NUMBERS
PDF
No ratings yet
Unix Lab Programs: Exercise No:2. ODD OR EVEN NUMBERS
11 pages
Unix and Linux Programming File
PDF
No ratings yet
Unix and Linux Programming File
20 pages
Shell Scripting: Theory Part-1
PDF
No ratings yet
Shell Scripting: Theory Part-1
8 pages
(Os) Lab Prgms
PDF
No ratings yet
(Os) Lab Prgms
19 pages
Unix - 29
PDF
No ratings yet
Unix - 29
26 pages
Shell
PDF
No ratings yet
Shell
48 pages
Sqlkab2 1
PDF
No ratings yet
Sqlkab2 1
9 pages
Unix As Sing
PDF
No ratings yet
Unix As Sing
32 pages
Introduction to Shell Scripting - Session 1
PDF
No ratings yet
Introduction to Shell Scripting - Session 1
17 pages
Python For Beginners
From Everand
Python For Beginners
Célio Azevedo
No ratings yet