aboutsummaryrefslogblamecommitdiffstats
path: root/loc.1
blob: efbfd2e3eb9f2ecc2bb2f4eae75f14f8c814ef0f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                            
                                                          
   
                
       

                                                           

   
                                                                                                          

   

                                                         

   
                                                   

   





                                                          
.TH LOC 1 "loc"
.SH NAME
loc - count number of lines of code
.SH SYNOPSIS
.B loc
.RI [ file "] ..."
.SH DESCRIPTION
.B loc
counts the number of lines of code for each specified
.BR file .
.B loc
will treat each file as a C source code or C header file. If
.I file
is
.BR - ,
or if a file is not specified, the standard input is read.
.PP
If more than one
.I file
is specified, each successfully line counted file will have
its of lines of code output on the format
.nf

	\fB"%s:%*s%zu\n"\fP, <\fIfile\fP>, <\fIsome positive integer\fP>, \fB""\fP, <\fI#lines of code\fP>
.fi
.PP
The total for all processed files, is printed on the last
line with the format
.nf

	\fB"%zu\n"\fP, <\fI#total lines of code\fP>
.fi
.PP
If exactly one or no files are specified, this will be the
only line output.
.SH OPTIONS
.TP
.B \-s
Only output the last line. (The total over all files.)