Shell Script

1.Write a Shell Script for the below scenario

a)Mr. Suleiman running a dress shop in Muscat. Ms. Noor visited that shop to purchase a dress for Eid festival. She selected one dress. Mr. Sulaiman sold that dress for 120 OMR. But he has purchased it for 100 rial. Write a shell script to input purchased price and selling price of a dress. If selling price is greater than purchasing price, then calculate total profit. if purchasing price is greater than selling price, then calculate total loss by using the formula below. Otherwise, display the message “no profit or no loss”

Profit = S.P - C.P (Where S.P is Selling Price and C.P is Cost Price)
Loss = C.P - S.P

Sample Solution