I have a csv file with X amount of lines in the following format
P26439,341,P,L,,P26439,,-0.41
where everytime there is a double comma i.e. ,,
I want to insert the word NA in between them so it would appear as ,NA,
would anyone have a sed, tr, perl or awk solution?
I know that I can replace a character using tr in the following way:
tr ",," ",NA,"
however this replaces any instance of a comma.