user9019741
user9019741

Reputation:

Command to Cleanse a .csv file in unix

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

Answers (1)

Stefan Birkner
Stefan Birkner

Reputation: 24510

You can use grep for this job:

grep -v "^[,]*$" <filename>

Upvotes: 2

Related Questions