Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assuming the file phone.txt has the following records { 1=2547475485 2=2547200001 3=1610821059 4=0 7=1 8= 9= 16=1 20=3613261515 605=xxcd21190f0e6c8a0f1 1509=Off 1510= } { 1=2547475432 2=2547218977

Assuming the file phone.txt has the following records { 1=2547475485 2=2547200001 3=1610821059 4=0 7=1 8= 9= 16=1 20=3613261515 605=xxcd21190f0e6c8a0f1 1509=Off 1510= }

{ 1=2547475432 2=2547218977 3=2210821022 4=0 7=1 8= 9= 16=1 20=9213261533 605=rt5321190f0e6c8a0f1 1509= 1510=On

}

{ 1=2547479872 2=2547212456 3=3310821033 4=0 7=1 8= 9= 16=1 20=8813261588 605=Arte21190f0e6c8a0f1 1509= 1510=On }

Write a shell script to extract fields of the file within each curly braces and record it in a csv file.

- The only variables to be extracted in the file are below 1,2,3,20,605,1509 and 1510. - The columns to be created in excel are only for the above specified fields and should have the header name as below 1 - MT 2 - MO 3 - A/C 20 - SN 605 - MAC 1509 - Offnet 1510 - Onnet The rows recorded in the excel/csv should have records as per below manually inputted data from the file.

image text in transcribed

Below is the desired output. MT MO A/C SN | Offnet Onne 2547475485 2547200001 1610821059 3613261515 xxcd21190f0e6c8a0f1 Off 2547475432 2547218977 2210821022 9213261533 rt5321190f0e6c8a0f1 On 2547479872 2547212456 3310821033 8813261588 Arte21190f0e6c8a0f1 On Below is the desired output. MT MO A/C SN | Offnet Onne 2547475485 2547200001 1610821059 3613261515 xxcd21190f0e6c8a0f1 Off 2547475432 2547218977 2210821022 9213261533 rt5321190f0e6c8a0f1 On 2547479872 2547212456 3310821033 8813261588 Arte21190f0e6c8a0f1 On

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_2

Step: 3

blur-text-image_3

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

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

What is Environment and Ecology? Explain with examples

Answered: 1 week ago

Question

1. Explain the 2nd world war. 2. Who is the father of history?

Answered: 1 week ago

Question

13-4 What are alternative methods for building information systems?

Answered: 1 week ago

Question

13-1 How does building new systems produce organizational change?

Answered: 1 week ago