![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Code:
wc -l log | awk '{ print $1}'
|
|
#3
|
|||
|
|||
|
just with this ,
wc -l < filename |
|
#4
|
|||
|
|||
|
Thanks a lot guys, both solutions work fine
See you, Jan |
|||
| Google The UNIX and Linux Forums |