Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please assist. The script should be written in bash/shell scripting. Thank you. 1. Modify the addi command to loop until the user enters quit and

Please assist. The script should be written in bash/shell scripting. Thank you.

1. Modify the addi command to loop until the user enters quit and to allow users to specify what function they want to apply to the pair of numbers given so that the following session would work.

cat addi

# Add pair of integers on standard input

while read n1 n2

do

echo $(( $n1 + $n2 ))

done

$ ./addi

100 200

300

100 - 50

50

5 * 5

25

5/5

error: not enough arguments given

quit

$

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

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions

Question

Calculate the lifetime value (LTV) of a loyal customer.

Answered: 1 week ago

Question

Use service tiering to manage the customer base and build loyalty.

Answered: 1 week ago