OCAMLWC(1)
π OCAMLWC(1) β the count-your-lines baddie π
okay bestie, so this is a General Commands Manual page for ocamlwc, and it lives in section 1 of the manual. That's the whole header situation, we're moving on, it's giving very demure, very mindful. π
β¨ NAME β¨
ocamlwc β count the lines of code and comments in OCaml sources
πΈ SYNOPSIS πΈ
ocamlwc [options] [files]
π¦ DESCRIPTION π¦
so ocamlwc is literally a program that counts the number of lines of code and the number of lines of documentation in OCaml sources. no cap, that's the whole gig. π«Ά
it assumes its input to be lexically well-formed β like, it's not out here doing detective work on your broken files, it just trusts you. π
and if you pass it no files at all, then ocamlwc reads from stdin. main character energy, it'll just wait for you to type at it. π
okay so the output?? let's break it down because the column situation is real:
- the first column is the number of source lines of code
- the second column is the number of lines of documentation
- the third column is the respective filename
and if ocamlwc acts on more than one file, then it prints a total in the last line. slay, math is mathing. β¨
π OPTIONS π
-pβ print percentage of documentation (in an additional column after the filename). yes bestie, we're doing percentages now, we're quantifying the vibe. π-cβ print only the code size, i.e., omit the documentation column. code only, doc who? π-eβ (everything) do not skip headers. and a header is the first comment in a file. so with-eyou're saying "keep the header, I want it, I'm obsessed." π-aβ (all) do not skip generated files. and here's the tea:foo.mlis a generated file if one offoo.mll,foo.mly, orfoo.ml4is amongst the given files. andfoo.mliis a generated file iffoo.mlyis amongst the given files. periodt. π-hβ print short usage information. the "help me help you" option, iconic, we stan. π
ngl, the-aand-eflags are the "don't skip stuff" flags. by defaultocamlwcis out here skipping headers and generated files like it's decluttering, and these two are how you tell it to stop. π§
π AUTHOR π
ocamlwc was written by Jean-Christophe Filliatre <Jean-Christophe.Filliatre@lri.fr>.
This manual page was written by Georg Neis <gn@oglaroon.de>.
and that's the whole page bestie, we ate and left no crumbs π β¨ β this came from the General Commands Manual and it's dated January 2, 2007, so yeah, vintage. still slaps tho. πππ¦
π¦ where this page comes from
- debian bookworm: ocamlwc 0.3-18 Β· GPL-2.0-only
- debian trixie: ocamlwc 0.3-21+b4 Β· GPL-2.0-only
- ubuntu jammy: ocamlwc 0.3-18build1 Β· GPL-2.0-only
- ubuntu noble: ocamlwc 0.3-21build1 Β· GPL-2.0-only
- ubuntu questing: ocamlwc 0.3-21build4
- ubuntu resolute: ocamlwc 0.3-21build5 Β· GPL-2.0-only
- ubuntu stonking: ocamlwc 0.3-21build6 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms