Hi,
I have a file with ';' delimeter which has some new line characters. How can I delete the new line characters if they are found between 1 to 10 fields.
Thanks
Hi,
I have a file with ';' delimeter which has some new line characters. How can I delete the new line characters if they are found between 1 to 10 fields.
Thanks
Can you show sample input?
lines 1 and 2 are bad records because of a new line character after "31 bridge Rd." it is suppose to be a single record with line 2
line 3 is fine.
B0000008650;MACS076775;0087767;NP MEM ;San ;Sam ;31 bridge Rd.$
; ; ;Mor ;TX;76657 ;SAM SAM ;31 BRIDGE RD ; ; ;MORE ;TX;767 ;N SUP 003623 ; ;BK I US PO 820 / 925 EPSON ;J3507153;2004-10-06 00:00:00;37.44;2;35.1;0$
B0000008650;MACS76775;0087788667;NP MEM ;San ;son ;3011 bridge Rd. ; ; ;Mr ;TX;76657 ;B SON ;31 BRIDGE RD ; ; ;MCR ;TX;76657 ;N SUP 00362114 ; ;COLOR I F US PHOTO 820 925 EPSON ;J3507153;2004-10-06 00:00:00;30.52;2;28.6;0$
Thanks
awk -F";" ' NF < 11 { a=$0; getline; $0=a$0 } 1 ' file > newfile