I am generating a CSV file which ideally should have 1-row or 2-row data but it is coming like
11,ABC,3,4,5,6
,,,,,
I have tried sed and awk commands to remove that empty row but it didn't work out
sed -i 's/,,//g' fileName.csv
(as this isn't a dynamic solution when we have odd number of commas)
awk -F, 'length>NF+1' fileName.csv > fileName.csv
(when I try to put that into the file it's removing all the rows from the file. Maybe my inexperience with sed and awk commands is the issue).