Question: Task 0 1 ( 1 5 points ) Task 0 2 ( 1 5 points ) Write a Bash script that takes an unspecified (
Task points Task points
Write a Bash script that takes an unspecified unlimited number of commandline arguments
parameters where each represents a filename. The script must iterate over each given
filename, check to see if the file exists, and if it does, display the number of lines in the file. If the
file does not exist, an appropriate error message should be displayed.
Use the shift command to allow for an unlimited number of filenames to be provided as
arguments.
In addition, if the script is run with no arguments provided, it should display a message to the
user with a hint as to how the command should be run sample syntax of the command usage
Here is a screenshot of the expected behavior, testing all scenarios described above.
Write a Bash script that accepts an operator abbreviation and a list of integers as command line
argument parameters and performs the operation on the list of integers. The script should be
able to handle addition, subtraction, multiplication, division, exponentiation, and modulo.
Use a loop and the shift command to allow for an unlimited number of integers to be provided
as arguments.
A usage hint message must be displayed if the user enters no arguments and an error message
must be displayed if the user enters invalid arguments.
Here is a screenshot of the expected behavior, testing all scenarios described above. Replicate
this functionality in your script, including the formatting and outputs of all messages.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
