joeroe3380
MIS
Futurlet,
Thanks alot for the superb script. Though the above awk does most of the tasks required, it however doesnt change the occurance of B. to " " as required. Also i need to
replace the occurance of
'(B.In_DT,'YYDD')' to '(OT_DT,'YYDDD')In_DT'.
Please advice on modifying the awk for the above changes. Also i would deeply appreciate if you could briefly explain the above awk. I tried referring to the syntax inorder to understand the awk statement that you had written,but it looks a bit complicated.
awk '
NR==FNR {
if (skipping)
next
if ( $0 ~ /B_comb/ )
{ sub( / *B_comb.*/, "" )
skipping = 1
}
else
if ( $0 ~ /^B\.$/ )
next
print
next
}
1
' file1 file2 >OUTDAT
Thanks a lot again
Roe.
Thanks alot for the superb script. Though the above awk does most of the tasks required, it however doesnt change the occurance of B. to " " as required. Also i need to
replace the occurance of
'(B.In_DT,'YYDD')' to '(OT_DT,'YYDDD')In_DT'.
Please advice on modifying the awk for the above changes. Also i would deeply appreciate if you could briefly explain the above awk. I tried referring to the syntax inorder to understand the awk statement that you had written,but it looks a bit complicated.
awk '
NR==FNR {
if (skipping)
next
if ( $0 ~ /B_comb/ )
{ sub( / *B_comb.*/, "" )
skipping = 1
}
else
if ( $0 ~ /^B\.$/ )
next
next
}
1
' file1 file2 >OUTDAT
Thanks a lot again
Roe.