joeroe3380
MIS
Hi group,
i was trying to accomplish the following;
read file1 untill the line "B_comb" is encountered and not including the phrase "B_comb".(say line 181 has sql_seq_num B_comb; B_comb should be removed while reading all the lines upto "B_comb" and retainig 'sql_seq_num' but removing "B_comb").
remove any occurance of 'B.' only.
replace the occurance of
'(B.In_DT,'YYDD')' to '(OT_DT,'YYDDD')In_DT' .
read file2 and append to the end of file1,
copy the above appended to a new output file OUTDAT.
I tried with a crude script encopassing
sed '/s/B.//'file1 >file2.
But it replaced other occurance of B ( say Base_DT) to ' ase_DT)' which was not desired.
Please advice on the above.
Thanks a lot!
Roe
i was trying to accomplish the following;
read file1 untill the line "B_comb" is encountered and not including the phrase "B_comb".(say line 181 has sql_seq_num B_comb; B_comb should be removed while reading all the lines upto "B_comb" and retainig 'sql_seq_num' but removing "B_comb").
remove any occurance of 'B.' only.
replace the occurance of
'(B.In_DT,'YYDD')' to '(OT_DT,'YYDDD')In_DT' .
read file2 and append to the end of file1,
copy the above appended to a new output file OUTDAT.
I tried with a crude script encopassing
sed '/s/B.//'file1 >file2.
But it replaced other occurance of B ( say Base_DT) to ' ase_DT)' which was not desired.
Please advice on the above.
Thanks a lot!
Roe