Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ocamlwc(1) [debian man page]

OCAMLWC(1)						      General Commands Manual							OCAMLWC(1)

NAME
ocamlwc - count the lines of code and comments in OCaml sources SYNOPSIS
ocamlwc [options] [files] DESCRIPTION
ocamlwc is a program to count the number of lines of code and documentation in OCaml sources. It assumes its input to be lexically well- formed. If no files are given, then ocamlwc reads from stdin. The first column of the output lists the number of source lines of code, the second column the number of lines of documentation, and the third the respective filename. If ocamlwc acts on more than one file, then it prints a total in the last line. OPTIONS
-p Print percentage of documentation (in an additional column after the filename). -c Print only the code size, i.e., omit the documentation column. -e (everything) Do not skip headers. A header is the first comment in a file. -a (all) Do not skip generated files. foo.ml is a generated file if one of foo.mll, foo.mly, or foo.ml4 is amongst the given files. foo.mli is a generated file if foo.mly is amongst the given files. -h Print short usage information. AUTHOR
ocamlwc was written by Jean-Christophe Filliatre <Jean-Christophe.Filliatre@lri.fr>. This manual page was written by Georg Neis <gn@oglaroon.de>. January 2, 2007 OCAMLWC(1)

Check Out this Related Man Page

MODERATORS(5)                                                   File Formats Manual                                                  MODERATORS(5)

NAME
moderators - mail addresses for moderated Usenet newsgroups DESCRIPTION
The GetModeratorAddress(3) routine reads the file /etc/news/moderators to determine how to reach the moderator of a newsgroup. This is used by inews(1) when an unapproved local posting is made to a moderated newsgroup. The file is read until a match is found. Blank lines and lines starting with a number sign (``#'') are ignored. All other lines should consist of two fields separated by a colon. The first field is a wildmat(3)-style pattern. If it matches the name of the newsgroup, then the second field is taken to be a format string for sprintf(3). This string should have at most one %s parameter, which will be given the name of the newsgroup with periods transliterated to dashes. Here is a sample file: foo.important:announce-request@foo.com foo.*:%s@mailer.foo.com gnu.*:%s@prep.ai.mit.edu *:%s@uunet.uu.net Using the above file, postings to the moderated newsgroup in the left column will be sent to the address shown in the right column: foo.important announce-request@foo.com foo.x.announce foo-x-announce@mailer.foo.com gnu.emacs.sources gnu-emacs-sources@prep.ai.mit.edu comp.sources.unix comp-sources-unix@uunet.uu.net HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.15, dated 1996/09/06. SEE ALSO
inews(1), inn.conf(5), libinn(3), wildmat(3). MODERATORS(5)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Counting lines and files

Hi experts, First of all thanks for all your help. How can i count the lines within a text file and send this number to another text file? And by the way how can i count the number of files inside a tape ("/dev/rtp") that as one pattern (Ex. "/CTA/") and send this number to a text file? I... (6 Replies)
Discussion started by: jorge.ferreira
6 Replies

2. Shell Programming and Scripting

Grep, count and match two files

I am writing the below script to do a grep and count number of occurances between two tab delimited files. I am trying to achieve.. 1) Extract column 2 and column 3 from the S.txt file. Put it in a temp pattern file 2) Grep and count column 2 in D.txt file 3) Compare the counts between... (19 Replies)
Discussion started by: madhunk
19 Replies

3. Shell Programming and Scripting

duplicates lines with one column different

Hi I have the following lines in a file SANDI108085FRANKLIN WRAP 7285 SANDI109514ZIPLOC STRETCH N SEAL 7285 SANDI110198CHOICE DM 0911 SANDI111144RANDOM WEIGHT BRAND 0704 SANDI111144RANDOM WEIGHT BRAND 0738... (10 Replies)
Discussion started by: dhanamurthy
10 Replies

4. UNIX for Dummies Questions & Answers

Adding columns to a file

I want to select the first column from a daily file called foo.csv. The result is written to file foo.txt. Currently the following script is used for that: cut -d, -f 1 foo.csv > foo.txt A typical result would yield : A12 A45 B11 B67 What needs to happen in addition is that two columns... (5 Replies)
Discussion started by: figaro
5 Replies

5. Shell Programming and Scripting

awk percentage

how would you calculate percentage by per line? Given a column of 16 lines, grab each line and divide it by the sum of the entire column and multiply by 100? thanks ... (8 Replies)
Discussion started by: rockiefx
8 Replies

6. Shell Programming and Scripting

Print from second column onwards if $1<=40 using awk

I have a file like below 10 10 21 32 43 54 20 10 25 36 47 58 30 19 20 31 42 53 40 10 24 35 46 57 50 10 28 39 40 51 I need to check if $1 <= 40, then print from $2 onwards. If $1 > 40, the line is not printed. So I would have an output like this 10 21 32 43 54 10 25 36 47... (10 Replies)
Discussion started by: kristinu
10 Replies

7. Shell Programming and Scripting

to count the number of occurences of a column value

im trying to count the number of occurences of column 2 value(starting from KKK*) of the below file, file.txt using the code cat file.txt | awk ' BEGIN { print "Category Counts"} {FS=","} {NR > 2} { cats = cats + 1} END { for(c in cats) { print c, "=", cats} } ' but its returning as ... (6 Replies)
Discussion started by: michaelrozar17
6 Replies

8. Shell Programming and Scripting

counting lines containing two column field values with awk

Hello everybody, I'm trying to count the number of consecutive lines in a text file which have two distinctive column field values. These lines may appear in several line blocks within the file, but I only want a single block to be counted. This was my first approach to tackle the problem (I'm... (6 Replies)
Discussion started by: origamisven
6 Replies

9. Shell Programming and Scripting

Removing repeating lines from a data frame (AWK)

Hey Guys! I have written a code which combines lots of files into one big file(.csv). However, each of the original files had headers on the first line, and now that I've combined the files the headers are interspersed throughout the new combined data frame. For example, throughout the data... (21 Replies)
Discussion started by: gd9629
21 Replies

10. Shell Programming and Scripting

awk on multiples files

Ques from newbie I want to total column X from large number of files, and view totals for each file separately with the filename. I have tried: for i in `ls -1 *.pattern`; do cat "$i" | awk '{SUM += $4} END { printf("%8d\t%8d\n", $i,SUM) }'; done does not work. appreciate your help (5 Replies)
Discussion started by: analyst
5 Replies

11. Shell Programming and Scripting

Appending new column to existing files

Hi, i want to add another column to existing files containing strings and need to have the final output as a csv file. i have quite a number of files, each with varying number of rows and i need to append the string "test" for all the valid rows for each file. my sample raw files looks like this... (8 Replies)
Discussion started by: ida1215
8 Replies

12. Shell Programming and Scripting

Remove lines from one file that exist in another file

Hello Everyone, I'm currently have a requirement where I've generated a list of files with specific attributes and I need to know what lines are similar between the two files. For example: -File 1- line1 line2 line3 -File 2- line1 line2 line4 line5 -Desires Output- line1 line2... (5 Replies)
Discussion started by: omnivir
5 Replies

13. Shell Programming and Scripting

I want to find the difference between two files, only for the header (column names)

Hi All, I want to find the difference between two files, by checking only the headers (column names) and report if any new column is added in the latest file. For Ex: If the file "declartion.txt has these columns url;image;id;showcase_id;showcase_name and the actual file "feed.txt" has... (34 Replies)
Discussion started by: Praveen Pandit
34 Replies

14. Shell Programming and Scripting

Reduce the number of lines by using Array

I have the following code to count the number of how many times the name occurred in one file. The code is working fine and the output is exactly what I want. The problem is the real code has more than 50 names in function listname which cause function name to have more than 50 case ,and function... (14 Replies)
Discussion started by: samsan
14 Replies

15. Shell Programming and Scripting

Attach filename to wc results on massive number of files

Hello, I have massive number of big files that needed to be counted for the total number of lines (> 100x millions) each. I want the file name attached to the count results so that they are aligned nicely matching name and counts. I could do each file at a time, which will take hours to finish,... (8 Replies)
Discussion started by: yifangt
8 Replies