Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Delimiter Conversion(Generic Code)

$
0
0
Hi All,

I am looking for a generic code which can search for the existing delimiter(what ever it may be) in a file and convert it to Pipeline. The file may have Pipeline delimiter already in that case just leave it. Please find below some sample records.
Sample records1:
HTML Code:

IMSDR,"Competitive,Segment","Decile_Augmented","Speicalty","In_Current_STP","MCR_Target","MCRO_Target","CVAS_Target","PR_Target","OCEAN_Target"
"0000230","GENERIC",9,"PCP","Y","Y","N","N","N","N"
"0000326","GENERIC",7,"PCP","Y","Y","N","N","N","Y"
"0000340","HIGH CRESTOR",6,"PCP","Y","Y","N","N","N","N"

Sample records2:
HTML Code:

IMS Model Type|Retail Method of Payment
CASH|CASH
FFS MED|MEDICAID
MEDICAID |COMMERCIAL THIRD PARTY
MGD MEDI|COMMERCIAL THIRD PARTY
CHIP|COMMERCIAL THIRD PARTY
MED B |COMMERCIAL THIRD PARTY

I need to make sure the headers are removed.
Any help as always appreciated.

Viewing all articles
Browse latest Browse all 16232

Trending Articles