aboutsummaryrefslogtreecommitdiffstats
path: root/loc.1
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2018-02-19 19:03:59 +0100
committerMattias Andrée <maandree@kth.se>2018-02-19 19:03:59 +0100
commitaa1526183b2479c1bf3d29ddbd5bafcd13443254 (patch)
treebeced5f56678e628b74b7ca727b45e5692b26f26 /loc.1
parentFirst commit (diff)
downloadloc-aa1526183b2479c1bf3d29ddbd5bafcd13443254.tar.gz
loc-aa1526183b2479c1bf3d29ddbd5bafcd13443254.tar.bz2
loc-aa1526183b2479c1bf3d29ddbd5bafcd13443254.tar.xz
Add readme and loc.1
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'loc.1')
-rw-r--r--loc.142
1 files changed, 42 insertions, 0 deletions
diff --git a/loc.1 b/loc.1
new file mode 100644
index 0000000..8c87eeb
--- /dev/null
+++ b/loc.1
@@ -0,0 +1,42 @@
+.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 - ,
+the standard input is read.
+.PP
+If no
+.I file
+is specified, the standard input is read, and the number
+of lines of code is output on the format
+.nf
+
+ \fB"%zu\n"\fP, <\fI#lines of code\fP>
+.fi
+.PP
+If exactly one
+.I file
+is specified, its number of lines of code is output on the format
+.nf
+
+ \fB"%zu\n"\fP, <\fI#lines of code\fP>
+.fi
+.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