Hi all,
I have made some script to modify data :
MO CELL CHGR TEI SIG DCP1
RXOTRX-0-0 LG300D1 ALL 0 CONC 128
SWVERREPL SWVERDLD SWVERACT DCP2
DEFAULT B0531R0902 B0531R0902 129
130
MO CELL CHGR TEI SIG DCP1
RXOTRX-0-1 LG300D1 ALL 1 CONC 131
SWVERREPL SWVERDLD SWVERACT DCP2
DEFAULT B0531R0902 B0531R0902 132
133
MO CELL CHGR TEI SIG DCP1
RXOTRX-1-0 LG001G1 ALL 0 CONC 128
.
.
.
etc
----------------------------------
and the result that I want to is :
LABSC02 LG300D1 RXOTRX-0-0 RXOTG-0
LABSC02 LG300D1 RXOTRX-0-1 RXOTG-0
LABSC02 LG001G1 RXOTRX-1-0 RXOTG-1
LABSC02 LG001G1 RXOTRX-1-1 RXOTG-1
LABSC02 LG001G2 RXOTRX-1-2 RXOTG-1
LABSC02 LG002G1 RXOTRX-3-0 RXOTG-3
LABSC02 LG002G1 RXOTRX-3-1 RXOTG-3
LABSC02 LG002G2 RXOTRX-3-2 RXOTG-3
LABSC02 LG002G2 RXOTRX-3-3 RXOTG-3
LABSC02 LG002G3 RXOTRX-3-4 RXOTG-3
.
.
.
LABSC02 LG061D3 RXOTRX-46-0 RXOTG-46
LABSC02 LG061D3 RXOTRX-46-1 RXOTG-46
LABSC02 LG061D3 RXOTRX-46-2 RXOTG-46
LABSC02 LG061D3 RXOTRX-46-3 RXOTG-46
LABSC02 LG061D3 RXOTRX-46-4 RXOTG-46
LABSC02 LG061D3 RXOTRX-46-5 RXOTG-46
, i have already try with this script... but the problem is I dont know how to cut a part of last field..
for i in LABSC02
do
nawk '
BEGIN {
}
/RXOTRX/ {
if ($1~/RXOTRX/) {TRX="RXOTG"substr($1,7)}
}
/CONC/ {
if ($0~/ALL/) {print "'"$i"'",$2,$1,TRX};
}' /rxmop$i
.... i dont know how to make variable on "TRX"a..
thk alot for kind help
Regards,
Levi
I have made some script to modify data :
MO CELL CHGR TEI SIG DCP1
RXOTRX-0-0 LG300D1 ALL 0 CONC 128
SWVERREPL SWVERDLD SWVERACT DCP2
DEFAULT B0531R0902 B0531R0902 129
130
MO CELL CHGR TEI SIG DCP1
RXOTRX-0-1 LG300D1 ALL 1 CONC 131
SWVERREPL SWVERDLD SWVERACT DCP2
DEFAULT B0531R0902 B0531R0902 132
133
MO CELL CHGR TEI SIG DCP1
RXOTRX-1-0 LG001G1 ALL 0 CONC 128
.
.
.
etc
----------------------------------
and the result that I want to is :
LABSC02 LG300D1 RXOTRX-0-0 RXOTG-0
LABSC02 LG300D1 RXOTRX-0-1 RXOTG-0
LABSC02 LG001G1 RXOTRX-1-0 RXOTG-1
LABSC02 LG001G1 RXOTRX-1-1 RXOTG-1
LABSC02 LG001G2 RXOTRX-1-2 RXOTG-1
LABSC02 LG002G1 RXOTRX-3-0 RXOTG-3
LABSC02 LG002G1 RXOTRX-3-1 RXOTG-3
LABSC02 LG002G2 RXOTRX-3-2 RXOTG-3
LABSC02 LG002G2 RXOTRX-3-3 RXOTG-3
LABSC02 LG002G3 RXOTRX-3-4 RXOTG-3
.
.
.
LABSC02 LG061D3 RXOTRX-46-0 RXOTG-46
LABSC02 LG061D3 RXOTRX-46-1 RXOTG-46
LABSC02 LG061D3 RXOTRX-46-2 RXOTG-46
LABSC02 LG061D3 RXOTRX-46-3 RXOTG-46
LABSC02 LG061D3 RXOTRX-46-4 RXOTG-46
LABSC02 LG061D3 RXOTRX-46-5 RXOTG-46
, i have already try with this script... but the problem is I dont know how to cut a part of last field..
for i in LABSC02
do
nawk '
BEGIN {
}
/RXOTRX/ {
if ($1~/RXOTRX/) {TRX="RXOTG"substr($1,7)}
}
/CONC/ {
if ($0~/ALL/) {print "'"$i"'",$2,$1,TRX};
}' /rxmop$i
.... i dont know how to make variable on "TRX"a..
thk alot for kind help
Regards,
Levi