Question: Writing a basic shell script. Write a script that outputs all lines in a file containing a specific keyword. Your script will be called fkey

Writing a basic shell script. Write a script that outputs all lines in a file containing a specific keyword.

Your script will be called fkey and the first argument to the script should be the keyword and the second the file

i.e. the general form of the command should be $ fkey keyword filename

Writing a basic shell script. Write a script that outputs all lines For example, if the users types: $ fkey apple foo.txt your script should print every line that contain the string apple from the file foo.txt.

I like apples. I like blueberries. I like pineapples and strawberries. Apples are tasty. Bananas are sweet

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!