Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. (15 Points) Write a complete, working bash script called euidB (where \"cuid\

ID: 3586172 • Letter: 2

Question

2. (15 Points) Write a complete, working bash script called euidB (where "cuid" is your EUID) that does the following: .Due to Blackboard limitations, the name of this bash script should not have the .sh extension. Write a function called product that accepts two integral parameters. This function will simply calculate the product of the two integral command-line-arguments passed to the function and output a meaningful message along with the result. In the main part of the function, you will check for the following: o command-line arguments and then arguments as parameters to the function. arguments are passed to the script, you will output both call the product function, passing both command-line o If tw When finished, let your befor e leaving or your work will not be graded and you may receive a 0 for this exam! TA know you are done as you must check out with your TA

Explanation / Answer

Execute below script

-------------------------------------------------------

#!/bin/bash

function product() {

output=`expr $a * $b`

echo "Output is :$output";

}

echo "Enter the value of a";

read a

echo "Enter the valure of b";

read b

product

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote