Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use SYSTEM CALLS ONLY. Answer quickly for a thumbs up!!! Expected behavior of your GREP $ ./lastnameGREP obligations apache.txt or other liability obligations and/or

Please use SYSTEM CALLS ONLY. Answer quickly for a thumbs up!!!

image text in transcribed

Expected behavior of your GREP

$ ./lastnameGREP obligations apache.txt

or other liability obligations and/or right consistent with this

License. However, in accepting such obligations, You may act

$./ lastnameGREP Appalachia apache.txt

$ ./lastnameGREP

Usage: ./lastnameGREP term file

$ ./lastnameGREP word notfile

Error opening file

3. Print lines containing a matching substring (lastnameGREP.c) Write a C program that takes a string and a file as arguments. This program should print out all lines of the file containing the given string. You can assume the string will not contain any special characters or regular expression syntax. Hint: As with the HEAD problem from last week, you should read the text line-by-line. However, you should only print a line if it contains the search term. If this program does not receive the correct number of arguments, or if it fails to open the given file, it should return errors

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

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions