Answered step by step
Verified Expert Solution
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started