Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!