The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Counting up a variable Kenada Shell Programming and Scripting 3 07-18-2007 04:07 AM
Counting Processes heprox Shell Programming and Scripting 4 03-21-2007 05:44 AM
Help with counting files please gerard1 Shell Programming and Scripting 6 09-25-2006 02:37 PM
Counting and sort bobo UNIX for Dummies Questions & Answers 4 05-23-2006 09:02 PM
counting characters plelie2 Shell Programming and Scripting 6 02-25-2003 01:38 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-04-2002
amatsaka amatsaka is offline
Registered User
  
 

Join Date: Mar 2002
Location: Greece
Posts: 14
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 (permalink)  
Old 06-04-2002
linuxpenguin's Avatar
linuxpenguin linuxpenguin is offline Forum Advisor  
Registered User
  
 

Join Date: May 2002
Location: India
Posts: 295
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:33 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0