Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribed

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

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

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions

Question

Was there an effort to involve the appropriate people?

Answered: 1 week ago