--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/cline.1 Sun Jul 05 12:26:02 2026 +0200 @@ -0,0 +1,160 @@ +.TH cline 1 "2026-07-05" "cline 1.6.0" "cline Manual" +.SH NAME +cline \- count line terminator characters in files +.SH SYNOPSIS +.B cline +.RI [ Options ] +.RI [ Directories... ] +.SH DESCRIPTION +.B cline +counts the line terminator characters +.RB ( \en ) +within all files in the specified directories. + +If no directory is specified, +.B cline +scans the current directory. +.SH OPTIONS +.TP +.BI \-b " level" +Set the binary file heuristics level. The default is +.BR medium . +Valid levels are: +.BR ignore , +.BR low , +.BR medium , +and +.BR high . +The heuristics use the ratio of non-printable characters after seeing +enough printable characters in the file (see +.MR isprint 3 ). +The higher the detection level, the +more printable characters the algorithm wants to see before making a decision. + +Note that some Unicode files with a high ratio of non-printable +characters from the perspective of +.MR isprint 3 , +might be misdetected by this algorithm as binary files. +.TP +.B \-c +Count non-whitespace characters instead of lines. +.TP +.B \-d +Report only directory sums. +.TP +.BI \-D " path" +Exclude the directory at the specified +.IR path . +A path can be relative or absolute but must always contain at least one path +separator. For example, if you want to exclude the top-level +.IR target +directory in a project of yours, use +.BI \-D " ./target" +to specify a path relative to your current directory. If you just write +.BI \-D " target" +you would exclude +.IR all +directories with that name in an recursive search with the +.BR -r +option. +This option may be used multiple times. +.TP +.BI \-D " name" +Exclude all directories with the given +.IR name . +This option may be used multiple times. +.TP +.BI \-E " pattern" +Exclude any line matching the regular expression +.IR pattern . +This option may be used multiple times. +.TP +.BI \-e " start end" +Exclude lines between the regular expressions +.I start +and +.IR end . +The first and the last line are only excluded when they completely match the +.IR start " or " end +pattern, respectively. +Similarly, when used with the +.BR \-c +option, characters within a line before +.IR start +matches and after +.IR end +matches are still counted. +This option may be used multiple times. +.TP +.BR \-h ", " \-\-help +Print help text and exit. +.TP +.B \-i +Print individual sums per file extension. +This option cannot be used together with +.BR \-V . +.TP +.B \-m +Print information about matching files only. +.TP +.BI \-s " suffixes" +Only count files with these suffixes. +Suffixes are separated by commas. +.TP +.BI \-S " suffixes" +Count any file except those with these suffixes. +Suffixes are separated by commas. +.TP +.BR \-r ", " \-R +Scan subdirectories recursively. +.TP +.BR \-v ", " \-\-version +Print version information. +.TP +.B \-V +Turn verbose output off and print the result only. +.SH SHORTCUTS +.TP +.B \-\-exclude\-cstyle\-comments +Equivalent to: +.BR "\-E '\es*//'" " " "\-e '\es*/\e*' '\e*/\es*'" +.TP +.B \-\-exclude\-blank\-lines +Equivalent to: +.BR "\-E '^\es*$'" +.SH EXAMPLES +.TP +.B cline \-rms .c,.h \-\-exclude\-cstyle\-comments +Recursively count matching +.I .c +and +.I .h +files, print matching files only, and exclude C-style comments. +.TP +.B cline \-Vc src +Print only the total number of non-whitespace characters in +.IR src . +.TP +.B cline \-rms .rs \-D ./target +Recursively count matching Rust source files starting with the current +directory, but skip the target directory. Print only matching files. +.TP +.B cline \-rb high -d -D .git +Recursively count all non-binary files with a high binary file detection +heuristic. Report only sums per directory and skip all directories with the +name +.IR .git . +.SH SEE ALSO +.UR https://uap-core.de/man/cline.html +https://uap-core.de/man/cline.html +.UE + +.UR https://uap-core.de/hg/cline +https://uap-core.de/hg/cline +.UE + +.UR https://sourceforge.net/projects/cline/ +https://sourceforge.net/projects/cline/ +.UE +.SH AUTHOR +Copyright 2018 Mike Becker. \ No newline at end of file