The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
specified word count bhaviknp Shell Programming and Scripting 5 02-27-2008 08:23 AM
Word count problem ssmith001 UNIX for Dummies Questions & Answers 1 01-02-2007 10:21 AM
count word ariuscy UNIX for Dummies Questions & Answers 1 10-12-2005 09:36 PM
word count wc chaandana UNIX for Dummies Questions & Answers 4 07-24-2005 10:15 PM
How do I count # of char. in a word? xadamz23 Shell Programming and Scripting 9 11-12-2003 09:19 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-07-2006
Registered User
 

Join Date: Jun 2006
Location: Gelsenkirchen,NRW,West-Germany
Posts: 15
Angry Word Count without any characters but the Output String

Hi all,

I am logging any access to a server, and i wanted to write a script which tells me how much entries there are.

The Problem is that

"wc -l log"

outputs the correct number of lines but with the name of the file attached.

is there any nice possibility to solve this that i ONLY get the number?


Thanks a lot,

Jan
Reply With Quote
Forum Sponsor
  #2  
Old 06-07-2006
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,298
Code:
wc -l log | awk '{ print $1}'
Reply With Quote
  #3  
Old 06-07-2006
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,610
just with this ,


wc -l < filename
Reply With Quote
  #4  
Old 06-07-2006
Registered User
 

Join Date: Jun 2006
Location: Gelsenkirchen,NRW,West-Germany
Posts: 15
Thanks a lot guys, both solutions work fine

See you,
Jan
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 11:50 PM.


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

Content Relevant URLs by vBSEO 3.2.0