Course Solutions Uncategorized (Solved) : Need Build Variant Unix Tool Grep Taking Two Arguments First Argument File Name Second Arg Q34696615 . . . .

(Solved) : Need Build Variant Unix Tool Grep Taking Two Arguments First Argument File Name Second Arg Q34696615 . . . .

 

Need to build a variant of the UNIX tool grep, taking in twoarguments. The

first argument is the file name, and the second argument is thesearch. It will look through a file,

line by line, to find a user specified term in the line. If theline contains the word, the line is

printed out. The search term will be a case-sensitive, singlealphanumeric string with no

whitespaces and at least one character. If the file does notexist or cannot be opened, print

“cannot open file” and exit.

For example, the current working directory contains 2 files:

test.txt and simple-grep (the executable of your program)

test.txt contains:

Lorem ipsum dolor sit

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post