man/cline.1

changeset 104
1b7716b156a4
equal deleted inserted replaced
103:31fa205db85a 104:1b7716b156a4
1 .TH cline 1 "2026-07-05" "cline 1.6.0" "cline Manual"
2 .SH NAME
3 cline \- count line terminator characters in files
4 .SH SYNOPSIS
5 .B cline
6 .RI [ Options ]
7 .RI [ Directories... ]
8 .SH DESCRIPTION
9 .B cline
10 counts the line terminator characters
11 .RB ( \en )
12 within all files in the specified directories.
13
14 If no directory is specified,
15 .B cline
16 scans the current directory.
17 .SH OPTIONS
18 .TP
19 .BI \-b " level"
20 Set the binary file heuristics level. The default is
21 .BR medium .
22 Valid levels are:
23 .BR ignore ,
24 .BR low ,
25 .BR medium ,
26 and
27 .BR high .
28 The heuristics use the ratio of non-printable characters after seeing
29 enough printable characters in the file (see
30 .MR isprint 3 ).
31 The higher the detection level, the
32 more printable characters the algorithm wants to see before making a decision.
33
34 Note that some Unicode files with a high ratio of non-printable
35 characters from the perspective of
36 .MR isprint 3 ,
37 might be misdetected by this algorithm as binary files.
38 .TP
39 .B \-c
40 Count non-whitespace characters instead of lines.
41 .TP
42 .B \-d
43 Report only directory sums.
44 .TP
45 .BI \-D " path"
46 Exclude the directory at the specified
47 .IR path .
48 A path can be relative or absolute but must always contain at least one path
49 separator. For example, if you want to exclude the top-level
50 .IR target
51 directory in a project of yours, use
52 .BI \-D " ./target"
53 to specify a path relative to your current directory. If you just write
54 .BI \-D " target"
55 you would exclude
56 .IR all
57 directories with that name in an recursive search with the
58 .BR -r
59 option.
60 This option may be used multiple times.
61 .TP
62 .BI \-D " name"
63 Exclude all directories with the given
64 .IR name .
65 This option may be used multiple times.
66 .TP
67 .BI \-E " pattern"
68 Exclude any line matching the regular expression
69 .IR pattern .
70 This option may be used multiple times.
71 .TP
72 .BI \-e " start end"
73 Exclude lines between the regular expressions
74 .I start
75 and
76 .IR end .
77 The first and the last line are only excluded when they completely match the
78 .IR start " or " end
79 pattern, respectively.
80 Similarly, when used with the
81 .BR \-c
82 option, characters within a line before
83 .IR start
84 matches and after
85 .IR end
86 matches are still counted.
87 This option may be used multiple times.
88 .TP
89 .BR \-h ", " \-\-help
90 Print help text and exit.
91 .TP
92 .B \-i
93 Print individual sums per file extension.
94 This option cannot be used together with
95 .BR \-V .
96 .TP
97 .B \-m
98 Print information about matching files only.
99 .TP
100 .BI \-s " suffixes"
101 Only count files with these suffixes.
102 Suffixes are separated by commas.
103 .TP
104 .BI \-S " suffixes"
105 Count any file except those with these suffixes.
106 Suffixes are separated by commas.
107 .TP
108 .BR \-r ", " \-R
109 Scan subdirectories recursively.
110 .TP
111 .BR \-v ", " \-\-version
112 Print version information.
113 .TP
114 .B \-V
115 Turn verbose output off and print the result only.
116 .SH SHORTCUTS
117 .TP
118 .B \-\-exclude\-cstyle\-comments
119 Equivalent to:
120 .BR "\-E '\es*//'" " " "\-e '\es*/\e*' '\e*/\es*'"
121 .TP
122 .B \-\-exclude\-blank\-lines
123 Equivalent to:
124 .BR "\-E '^\es*$'"
125 .SH EXAMPLES
126 .TP
127 .B cline \-rms .c,.h \-\-exclude\-cstyle\-comments
128 Recursively count matching
129 .I .c
130 and
131 .I .h
132 files, print matching files only, and exclude C-style comments.
133 .TP
134 .B cline \-Vc src
135 Print only the total number of non-whitespace characters in
136 .IR src .
137 .TP
138 .B cline \-rms .rs \-D ./target
139 Recursively count matching Rust source files starting with the current
140 directory, but skip the target directory. Print only matching files.
141 .TP
142 .B cline \-rb high -d -D .git
143 Recursively count all non-binary files with a high binary file detection
144 heuristic. Report only sums per directory and skip all directories with the
145 name
146 .IR .git .
147 .SH SEE ALSO
148 .UR https://uap-core.de/man/cline.html
149 https://uap-core.de/man/cline.html
150 .UE
151
152 .UR https://uap-core.de/hg/cline
153 https://uap-core.de/hg/cline
154 .UE
155
156 .UR https://sourceforge.net/projects/cline/
157 https://sourceforge.net/projects/cline/
158 .UE
159 .SH AUTHOR
160 Copyright 2018 Mike Becker.

mercurial