Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 2
    Regarding your tr solution, why not just tr -cd "\t" | wc -c? Commented Nov 11, 2013 at 16:47
  • 1
    @JosephR. Because tr -cd \\t will also remove the newline character, and we want to keep this one! Commented Nov 11, 2013 at 16:51
  • 2
    OK. Got it. I thought tr would respect newline boundaries and produce line-by-line output by default. Commented Nov 11, 2013 at 16:56