This is my awk code:
awk -F"," 'NF!= 8' myfile.csv
How can I delete only lines that have 8 fields.
This is my awk code:
awk -F"," 'NF!= 8' myfile.csv
How can I delete only lines that have 8 fields.
Here you go (this prints lines with 8 fields as originally asked)
awk -F, 'NF==8' myfile.csv
The question changed, you want to remove the lines with 8 fields. One way to do this
awk -F, 'NF!=8' myfile.csv > temp && mv temp mvfile.csv
NB. updated as per comments