Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For Linux Part 1 Write a bash script that accepts a variable number of command line arguments/parameters (all integers) and display the sum of all

image text in transcribed

For Linux

Part 1 Write a bash script that accepts a variable number of command line arguments/parameters (all integers) and display the sum of all the arguments. If there are no command line arguments, the script should display No numbers to add" Submission Submit this lab to 2032Z Directory LAB2 with file name lab2_1.sh Part 2 Write a shell script that accepts two arguments. The first is a string, the second is a file name. The script searches the file for the string, then it displays one of these messages. 1. If the string is in the file, it should display word does exist in file_name, where word is the string that is the first command line argument, and file_name is the name of the file given in the command line arguments 2. If the string is not in the file, it should display "word does not exist in file_name, where word is the string that is the first command line argument, and file_name is the name of the file given in the command line arguments 3. If the file does not exist, it should display file_name does not exist where file_name is as explained above

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

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions

Question

3 How the market system answers four fundamental questions.

Answered: 1 week ago

Question

5 The mechanics of the circular flow model.

Answered: 1 week ago