Question: terminal - using the vi Lab2_2.sh Write a shell script that accepts two arguments. The first is a string, the second is a file name.

terminal - using the vi Lab2_2.sh

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 thesemessages. 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

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

If the file does not exist, it should display file_name does not exist where file_name is as explained above

please post the run code too

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!