The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
count the number of files which have a search string, but counting the file only once sudheshnaiyer UNIX for Dummies Questions & Answers 1 08-11-2007 10:50 AM
Count the number of occurence of perticular word from file rinku Shell Programming and Scripting 40 08-10-2007 04:33 PM
count lines of file panknil Shell Programming and Scripting 15 06-07-2007 01:40 AM
hw can i count the number of character in a file by perl trupti_rinku Shell Programming and Scripting 1 10-31-2006 03:27 AM
word count showing wrong number of lines tselvanin UNIX for Dummies Questions & Answers 3 01-06-2004 07:33 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-03-2005
Member
 

Join Date: Jul 2005
Posts: 52
Stumble this Post!
Count number of lines in Binary file

Hi Friends
Please help me out to count number of lines in binary file. It gives some wrong(less) using wc -l. Is there any other way to count lines of binary file.
Thanks.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 09-03-2005
Registered User
 

Join Date: Jul 2005
Posts: 137
Stumble this Post!
A binary file doesn't have lines.
Reply With Quote
  #3 (permalink)  
Old 09-03-2005
Member
 

Join Date: Jul 2005
Posts: 52
Stumble this Post!
Quote:
Originally Posted by futurelet
A binary file doesn't have lines.
Thanks for the Information.
Is there no way to count records in it.
Reply With Quote
  #4 (permalink)  
Old 09-04-2005
RishiPahuja's Avatar
Registered User
 

Join Date: Apr 2005
Location: Bangalore, India
Posts: 203
Stumble this Post!
Thumbs up

are records of fixed/variable format?

if variable are the records delimited? if yes you can count no of records if no you can't.

if records are of fixed length you need to know the file layout.Like where header is, where records is etc. ,if no such information is available i doubt if at all it is possible.

rishi
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:47 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0