I have a few comma delmited files in a folder. The lines look like this…
1,2,3,4,5
6,7,8
9,10
11,12,13,14,15
All the files are expected to have exact 5 columns. But there are a few files where one or all the lines are less than 5 as shown above.
How do I know the names of such files?
If all the lines have exactly 4 comma then there is no issue and such files are considered OK.
does this line (find + awk) work for you?
assume that your files have extension “txt”
update
OP wants the line numbers:
update again
OP, you should describe your question more clearly.
so you want the total line numbers (the sum):