Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Awk scripting is required..

Status
Not open for further replies.

123naz

Technical User
Nov 17, 2002
4
SA
Hi,

I would like to get an output as below. The first line is the heading and subsequents lines should get from a text file. Date can be todays date and it is not provided in input file.

MSC DATE BSC NSUB NSUBA
M601 Today's Date E609 20510 17558
M601 Today's Date E607 16858 13710
M601 Today's Date E630 30809 26912
M601 Today's Date E605 12853 10672
M601 Today's Date E604 6659 5344
M601 Today's Date E603 33622 29131
M301 Today's Date E358 34410 29920
M301 Today's Date E359 36910 32291
M301 Today's Date E360 47813 42749
M301 Today's Date E370 7839 6096
M301 Today's Date E367 15110 12937

My Input file is shown below:


*** Connected to M601 ***
<mgbsp:bsc=all;
MT BASE STATION CONTROLLER DATA

BSC R1 R2 MGG
E609 E609O E609I E609

BSCMGG PBSD
E609 FORWD

BSCDATA
PHASE2-1
MSLOT-0
14DOT4-0
HRATE-1
NIRR-1
MSCODER-1
BCIC-0

BSCCODEC

NSUB
20510

NSUBA
17558

E607 E607O E607I E607

BSCMGG PBSD
E607 FORWD

BSCDATA
PHASE2-1
MSLOT-0
14DOT4-0
HRATE-1
NIRR-1
MSCODER-1
BCIC-0

BSCCODEC

NSUB
16858

NSUBA
13710

E630 E630AO E630AI E630A
E630BO E630BI E630B

BSCMGG PBSD
E630 FORWD

BSCDATA
PHASE2-1
MSLOT-0
14DOT4-0
HRATE-1
NIRR-1
MSCODER-1
BCIC-0

BSCCODEC

NSUB
30809

NSUBA
26912

E605 E605O E605I E605

BSCMGG PBSD
E605 FORWD

BSCDATA
PHASE2-1
MSLOT-0
14DOT4-0
HRATE-1
NIRR-1
MSCODER-1
BCIC-0

BSCCODEC

NSUB
12853

NSUBA
10672

E604 E604O E604I E604

BSCMGG PBSD
E604 FORWD

BSCDATA
PHASE2-1
MSLOT-0
14DOT4-0
HRATE-1
NIRR-1
MSCODER-1
BCIC-0

BSCCODEC

NSUB
6659

NSUBA
5344

E603 E603O E603I E603

BSCMGG PBSD
E603 FORWD

BSCDATA
PHASE2-1
MSLOT-0
14DOT4-0
HRATE-1
NIRR-1
MSCODER-1
BCIC-0

BSCCODEC

NSUB
33622

NSUBA
29131
END

<

*** Connected to M301 ***
<mgbsp:bsc=all;
MT BASE STATION CONTROLLER DATA

BSC R1 R2 MGG
E358 E358O E358I

BSCDATA
PHASE2-1
MSLOT-0
14DOT4-0
HRATE-1
NIRR-1
MSCODER-1
BCIC-0

BSCCODEC

NSUB
34410

NSUBA
29920

E359 E359O E359I

BSCDATA
PHASE2-1
MSLOT-0
14DOT4-0
HRATE-1
NIRR-1
MSCODER-1
BCIC-0

BSCCODEC

NSUB
36910

NSUBA
32291

E360 E360O E360I

BSCDATA
PHASE2-1
MSLOT-0
14DOT4-0
HRATE-1
NIRR-1
MSCODER-1
BCIC-0

BSCCODEC

NSUB
47813

NSUBA
42749

E370 E370O E370I

BSCDATA
PHASE2-1
MSLOT-0
14DOT4-0
HRATE-1
NIRR-1
MSCODER-1
BCIC-0

BSCCODEC

NSUB
7839

NSUBA
6096

E367 E367O E367I

BSCDATA
PHASE2-1
MSLOT-0
14DOT4-0
HRATE-1
NIRR-1
MSCODER-1
BCIC-0

BSCCODEC

NSUB
15110

NSUBA
12937
END

<

Could you please suggest a awk script for this

Regards
Naz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top