Newline characters in fields of a file

My source file is pipe delimeted file with 53 fields.In 33 rd column i am getting mutlple new line characters,dule to that record is breaking into multiple records.
Note : here record delimter also \n

sample Source file with 6 fields :

1234|abc| \nabcd \n bvd \n cde \n |678|890|900\n

when i am trying to read it, file is reading as

1234|abc|
abcd
bvd
cde
|678|890|900

required output:

1234|abc|abcd bvd cde |678|890|900 \n

What you want to achieve with this file..?

And what you have tried so far..?

i am not able to read the file through sequential file in datastage job.
I just wanted to remove new line characters in 3 column of a file.

I am not a unix resource and i am very bad at SED & AWK commands. i am trying to take a help of google

If you want to remove "\n" from file use

sed 's/\\n//g' file

Thankyou for your reply.but this command removes all /n characters in the file. but i need /n character at the end of each record.because it is a record delimiter.

I know there should be better way..

I am not very good at sed regex..:smiley:

sed 's/\\n$/_-_-_/g;s/\\n//g;s/_-_-_/\\n/' file

Try (even though your required output does NOT fit the sample input given):

awk -F\| '{while (NF<6) {getline Xvar; $0=$0Xvar}}
          1
         ' file
1234|abc| abcd  bvd  cde  |678|890|900

Adapt to your needs, esp. the field separator assignment; works as is on linux/mawk.