I have a CSV file and I need to filter out some rows that do not contain certain values. Because of this I don't care about those rows and want to remove them or put the results of the command in a new csv file.
This is the format of my CSV file:
employeeid,time,homephone,workphone,ssn,insurance,address,state,salary,position,rank,boss,hiredate
Now there are some rows that have no information some of these fields. How would I perform an awk or sec command to read all the lines in the csv file and only put the lines which no fields are null into another file? Or would it be possible to replace every ,, with a word like notthere? I have some word replacing going on here but this is not 100% working.
So far I have something like this:
sed -e 's/^,/notthere,/' old.csv > new.csv
This pretty much does nothing that I am looking for. I would greatly appreciate it if someone could help me out. I am not that experienced with using linux commands at all.
Thank you!