LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-12-2006, 08:31 AM   #1
logicalfuzz
Member
 
Registered: Aug 2005
Distribution: Arch Linux
Posts: 291

Rep: Reputation: 47
search / count unique patterns in text file


Hi,
I have an http log file. Using "cut" command i managed to get the IPs hitting my web server. But the problem is i need unique IPs hitting the server with the count as of how many times they have hit. How can i do this?

Thanks in advance...

edit: I know a script may serve this. Does a command sequence exist for this?

Last edited by logicalfuzz; 10-12-2006 at 08:32 AM.
 
Old 10-12-2006, 11:56 AM   #2
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 57
Code:
uniq -uc
man uniq
 
Old 10-14-2006, 08:58 AM   #3
logicalfuzz
Member
 
Registered: Aug 2005
Distribution: Arch Linux
Posts: 291

Original Poster
Rep: Reputation: 47
Holy me!!!
How can i forget uniq!! Thanks for the help cs-cam...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Count occurances of a string in a text file MicahCarrick Linux - Software 1 06-24-2006 05:25 PM
Deleting text between two different patterns activeco Linux - General 7 09-13-2005 07:05 PM
Which command to search text/phrase in file? b:z Linux - General 2 03-30-2005 10:11 PM
Need to search for *last* occurrance in a text file ericcarlson Linux - Software 1 09-11-2004 03:08 PM
How do you search for a file in text mode? cyberkid12 Linux - General 7 12-21-2002 01:42 AM


All times are GMT -5. The time now is 04:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration