LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-29-2010, 11:45 PM   #1
tquang
Member
 
Registered: Jul 2010
Posts: 44

Rep: Reputation: 0
How to GREP string?


Hi, i have question about grep string.

Today, i checking my error log of Apache. I have look many IP brute scan URL.
So, i collect, export that to ip.txt and i need grep IP with connection >=8

I don't know command to solve that. Example ip.txt
Quote:
101 210.13.73.30
161 58.210.77.98
164 115.168.71.87
164 200.247.215.250
164 61.178.24.100
164 61.235.143.134
165 124.160.192.22
165 188.21.56.198
165 189.39.12.20
165 201.227.239.11
165 202.102.123.102
165 202.103.52.147
165 217.112.166.97
165 218.206.219.130
165 218.69.27.138
165 61.240.233.217
165 62.151.177.226
165 86.64.192.188
165 87.106.144.130
165 89.208.153.2
187 91.193.157.206

Last edited by tquang; 07-29-2010 at 11:46 PM.
 
Old 07-30-2010, 12:36 AM   #2
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Code:
awk '$1>=8{print $2}' file
 
Old 07-30-2010, 12:51 AM   #3
tquang
Member
 
Registered: Jul 2010
Posts: 44

Original Poster
Rep: Reputation: 0
Thank ghostdog74 very much. I will try it.

Have a good day!
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] grep a string with space vikas027 Programming 5 02-09-2010 04:22 PM
grep a particular string john83reuben Linux - Newbie 3 12-07-2009 09:34 AM
grep string with space (2 word string) casperdaghost Linux - Newbie 7 08-24-2009 02:11 AM
How to grep for a string in a file kaprasanna Linux - Newbie 3 01-06-2009 06:29 AM
how to grep only one string pr match gummimann Linux - General 3 11-06-2003 09:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:30 AM.

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
Open Source Consulting | Domain Registration