0% found this document useful (0 votes)
43 views1 page

Unix prg2

A Unix shell script uses a case statement to perform arithmetic operations by reading two numbers, reading a choice of operation (addition, subtraction, multiplication, or division), performing the corresponding operation based on the choice, and stopping the process.

Uploaded by

nihara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views1 page

Unix prg2

A Unix shell script uses a case statement to perform arithmetic operations by reading two numbers, reading a choice of operation (addition, subtraction, multiplication, or division), performing the corresponding operation based on the choice, and stopping the process.

Uploaded by

nihara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

ARITHMETIC OPERATION

AIM:
To write a unix shell script for performing arithmetic operations using case statement.

Algorithm:
Step 1: Start the process
Step 2: read two numbers a and b
Step 3: read a choice ch
Step 4: If c=1 do addition operation
If c=2 do subtraction operation
If c=3 do multiplication operation
If c=4 do division operation
Else exit
Step 5: stop the process.

You might also like