Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LINUX!! Write a script that will act as a simple calculator for add, subtract, multiply, and divide; each operations should be in a function of

LINUX!!

Write a script that will act as a simple calculator for add, subtract, multiply, and divide; each operations should be in a function of its own. Any of the three methods for bash arithmetic, let, expr or $((..)), may be used. The user should pass as an argument on the command line a letter (a, s, m or d) and two numbers. The letter will be used to determine which operation will be performed on the two numbers entered. If one or more of the three parameters is left out, then display a usage message. Finally display the answers. This script should be called calculator.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions