Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the awk command in Unix. I need to manipulate raw data with course numbers and 9 digit employee numbers at the end like the

Using the awk command in Unix.

I need to manipulate raw data with course numbers and 9 digit employee numbers at the end like the following two examples.

Fall 2017 COMM 438T-01 21785 888972491

Summer 2017 MSW 571-40 11230 890248716

I'm trying to produce a listing which is grouped by season (fall and summer) and ordered by class number(the numbers around the dash) and then section number(the 5 digit number) in descending order. Then a count for the amount of Fall and Summer groups. I have the awk command and scripting as tools to do this.

****Each line that's output needs to be a line that has a 9 digit employee number included within it.

I try to use awk '/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/{print " "$0""$1""$2""$3" "$4" "$5""$6""$7""$8""$9}' a.txt | sort

but for some reason it seems to merge a couple lines together, i have lines that have 22 elements instead. Almost as if each line doubled in size and more.

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions