Hi,
I need help for below scenario.I have a flat file which is having records seperated by delimiters which will represent each record for oracle table.My Control file will consider each line as one record for that table. Some of the lines are aligned in two/three lines so that records are rejected by scripts.
I need help to align the data as expected.
Input will be like below:
PC111111^|test1^|.... ->Line1-Its inserted corretly
PC222222^|test2^|
asdgasdgaj^| ->Line2 seperated into two records so its considered as bad record.
Please help me with command that will append next line with previous line if PCXXXXXX pattern is not found as first word in each line.
I have tried with
sed -e :a -e '$!N;s/\n[^PC]//;ta' -e 'P;D'
But its not appending if the next line starts with "P","^" and "C".:wall:
Any inputs are greatly appreciated.