Question: Create a shell script that accepts parameters and uses grep tosearch for patterns: The script will accept three parameters representing, in order,a file extension, a

Create a shell script that accepts parameters and uses grep tosearch for patterns:

The script will accept three parameters representing, in order,a file extension, a year and a new filename. and it uses grep to search dirfile.txt for all lines that end withthe file extension represented by the first parameter, and writethe results to the filename represented by the third parameter alsouse grep to search dirfile.txt for all lines that include the yearrepresented by the second parameter, and write the results to thefilename represented by the third parameter.

Please make script in Linux, make template please

Step by Step Solution

3.33 Rating (150 Votes )

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 Programming Questions!