Counting LOC in C


 
Thread Tools Search this Thread
Top Forums Programming Counting LOC in C
# 1  
Old 06-04-2002
Counting LOC in C

Hi
Do you know where I can find any utility that counts lines of code in a C program, accurately?

The ones that count the semicolons does not give correct results.

Thanx Andonis Matsakas
# 2  
Old 06-04-2002
Re: Counting LOC in C

Hi,

If your c program is just a simple text file then you have to simple run the following command

wc -l filename

and if you want to find out the number of lines containing semi-colons then use this command

grep ";" filename|wc -l

I hope this is the output you are expecting
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. AIX

Missing base level fileset for "bos.loc.utf.EN_US"

I need to install "bos.loc.utf.EN_US" in AIX ( version 6100-06-05-1115). I found the right bff U845493 and I smitty to install it and encountered the "missing requisites" error in which missing the "base level fileset" . And I couldn't find this fileset from the Internet for long. Do any one able... (2 Replies)
Discussion started by: bshcheng
2 Replies

2. UNIX for Dummies Questions & Answers

counting?

Hi all, I promise this is my very last dumb question.. but how to you count how many unique names you have. My dataset is: >Bac1 afdsgrr >Bac4 egege >Bac8 dgrjh >Bac1 afdsgrr >Bac1 afdsgrr >Bac8 dgrjh What i want to know is that how many unique names there is, so the output would... (3 Replies)
Discussion started by: Iifa
3 Replies

3. Shell Programming and Scripting

Extract Velocity Data (Loc, Time, Velocity)

Hi , I am just learning awk and wanted to do the following : Data (Velocity Data) Function of Hanvdel with time/velocity pair; HANDVEL 20288 20 9243 160 10658 204 11365 336 12651 444 13444 560 13937 652 14237 776 14537 924 15159 1052 15438 1168 15523 1316 15309 1452 15137 1736 15416... (11 Replies)
Discussion started by: rtsiahaan
11 Replies

4. UNIX for Dummies Questions & Answers

Counting # of lines

Counting number of lines: sp I am trying to figure out a script to count the number of text files in cywig and have it give me a number (as the answer) any help would be appreciated. I am new here, so be gentle :D (3 Replies)
Discussion started by: unicksjp
3 Replies

5. Shell Programming and Scripting

Counting

Hi, The following output shows how many pmon process are started by users named : oracle or yoavb $ ps -ef |grep pmon |grep -v grep |grep -v ipmon oracle 11268 1 0 Sep 2 ? 36:00 ora_pmon_qerp oracle 17496 1 0 Oct 11 ? 8:58 ora_pmon_bcv oracle 15081 1 0 ... (5 Replies)
Discussion started by: yoavbe
5 Replies

6. Shell Programming and Scripting

Counting

Hi, I want to count how many rows are in a file for a specific column. eg. K NM K NM K NM K JK K NM K JK K NM so the file is tab-delimited. I want to count how many rows are in column 2 and how many NMs there are. I used awk awk '{OFS="\t"}; {count++} {print i,... (3 Replies)
Discussion started by: phil_heath
3 Replies

7. AIX

How do I install bos.loc.iso.en_GB?

Hi, I need to install the package bos.loc.iso.en_GB on an AIX 5.3 server but try as I might I cannot find the file which contains this package. I have all the AIX 5.3 CDs and also the majority of the packages installed locally on the server. If I create a .toc file from the local packages I... (3 Replies)
Discussion started by: m223464
3 Replies

8. UNIX for Advanced & Expert Users

looking for solution to improve process replicate files to remote loc.

looking for solution to replicate 1.5GB files to a remote location... Currently, this process looks like the following: move 1.5GB files into a staging area. compress files. rsync files to remote server. remove compressed files. I have performed some timings, and compress seems more... (5 Replies)
Discussion started by: mr_manny
5 Replies
Login or Register to Ask a Question