Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Count Characters #234

Open
flofriday opened this issue Oct 22, 2017 · 2 comments
Open

Count Characters #234

flofriday opened this issue Oct 22, 2017 · 2 comments

Comments

@flofriday
Copy link

It would be nice if there was an option to count the characters instead of just the lines.

@AlDanial
Copy link
Owner

It's a good idea, esp since some C/C++ styles call for a single brace character on a line by itself which becomes an exaggeration to call that a line of code. However the capability doesn't fit well with the existing cloc architecture. I'll leave this issue open but do not foresee an imminent solution.

@rxliuli
Copy link

rxliuli commented Oct 9, 2022

I finally used the unix command to combine

$ find books/ -name '*.md' | xargs wc -m | tail -l | awk '/total/{print $1}'

or

$ find books/ -name '*.md' -exec wc -m {} + |  awk '/total/{print $1}'

ref: https://stackoverflow.com/questions/35559648/how-can-i-count-the-number-of-words-in-a-directory-recursively

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants