Given a text file that is supposed to contain 10 tab-delimited columns (i.e. 9 tabs), I'd like to find all rows that have more than 10 columns (more than 9 tabs). Each row ends with CR-LF.
Assume nothing about the data, field widths, etc, other than the above.
Comments regarding approach, and/or working code would be extremely appreciated. Bonus for printing line numbers of offending lines as well.
Thanks in advance!
EDIT, as pointed out by the commenter (thanks!), you can assume the data doesn't contain tabs or CRLF's.