I have used sed to allow only numeric and csv format ,I have used sed '/[^0-9, -, .]/d' as regex. It has still _,1-0,1-1 character as o/p which worries me. sed 's/'$(printf '\015')'//g' ./abc.CSV | sed '/[^0-9, -, .]/d' 1,090216002122,128,126,134,124,-0,00,220,28,292688,077,040911,0858,01591,090216002123,128,126,134,124, 000,00,_220,28,292688,077,040911,0858,01591,090216002125,128,126,134,124, 000,00,220,28,292688,077,040911,0858,1701,090216002126,128,126,134,124, 000,-.00,220,28,292688,077,040911,0858,01591,090216002130,128,126,134,124, 000,00,220,28,292688,077,040911,0858,   1,090216002134,128,126,134,124, 000,00,220,28,,077,040911,0858,01591,090216002135,128,126,134,124, 000,00,220,28,077,040911,0858,015911,090216002137,128,126,134,124, 000,00,220,28,292688,077,040911,0858,01591-1,090216002137,128,126,134,124, 000,00,220,28,292688,077,040911,0858,01591,000000000000,000,0,0,0,0,0,0,0,0,0,0,0,01,040216002137,128,126,134,124, 000,00,220,28,292688,077,040911,0858,01591,090216002137,128,126,134,124, 000,00,220,28,292688,077,040911,0858,0-1I have tried with ($9 ~ /^-?[0-9]+([.][0-9]+)?$/ ) doesnt seems to work with space number. I have also tried with What is the best way to parse only numeric from a csv file? Thanks.
Delete Non numeric row from a csv
bash;sed;awk;tr