Question: Write a Perl script (called grep.pl) that has 2 command line parameters - a string and a filename. Search each line in the file for

 Write a Perl script (called grep.pl) that has 2 command line

Write a Perl script (called grep.pl) that has 2 command line parameters - a string and a filename. Search each line in the file for a match to the string. If found, print out the whole line. E.g. perl grep.pl "software" lectureNotes.txt

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!