Reputation:
I have a csv file like
abc,qwe,qwe,
addadf,dfsgsfg,sdgsdg,
adfsg,sdgsfg,sgsfg,
,,,,,
I have to parse the file in a way such that i don't get those blank lines with commas at the end
Upvotes: 0
Views: 45
Reputation: 24510
You can use grep
for this job:
grep -v "^[,]*$" <filename>
Upvotes: 2