I have a tab-tabulated file. I would like to check if every line has the same number of tabs.
For first step, I'd like to print the number of tabs for each individual line.
I've tried grep -o "\t"'\t' infile | wc -l, but my implementation of grep says grep: invalid option -- o. Is there an other way?
Nice to have: if possible, due personal preference, I'd prefer to do this with util (grep, cat, etc.) tools, preferably not awk or bash scripting.