Question: In this assignment, your shell script will be input two command line arguments, which will be file names. An example for these files is given

 In this assignment, your shell script will be input two commandline arguments, which will be file names. An example for these files

In this assignment, your shell script will be input two command line arguments, which will be file names. An example for these files is given below: file1.txt: 15.10.2017.ali 8.6.2010.mehmet 3.12.2011.alper 19.11.2004.ahmet file2.txt: 12.12.2013.kaan 4.6.2005.atilla 18.4.2014.sinan 15.12.2005.mert Step 1: You will create awk1.awk, which can be used for both files above. awk1.awk partitions a date value formatted as in filel.txt and file2.txt into day, month, year and name fields and appends these fields to out1.txt. Example: When file1.txt is input to awk1.awk, the contents of outl.txt become as given below: 15 10 8 6 2017 2010 2011 2004 ali mehmet alper Ahmet 3 19 12 11 After executing awkl.awk to process file2.txt, out1.txt becomes: 15 10 2017 ali 8 6 2010 mehmet 3 12 2011 alper 19 11 2004 Ahmet 12 12 2013 Kaan 4 6 2005 Atilla 18 4 2014 Sinan 15 12 2005 mert Step 2: You will create awk2.awk, which processes outl.txt. In awk2.awk, print the even numbered lines with their names start with letter 'a' (use regular expression )existing in outl.txt, execute awk2.awk in your shell script. When your shell script completes execution, the output will be: 19 11 2004 ahmet 4 6 2005 atilla You will have only one shell script with two awk scripts

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!