LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-19-2007, 03:46 AM   #1
Manana
Member
 
Registered: Dec 2005
Distribution: Ubuntu,Debian
Posts: 41

Rep: Reputation: 15
Get IP from logfile


Hi there, need some help

This is what i want to do:
I want to check my auth.log for failed login attempts and extract the ip numbers of the remote host.
The problem im having is to get Just the IP and nothing else.
Tried doing it with sed but its complicated(or maybe im just stupid). Looking for something like "print everything that matches the pattern "numbers.numbers.numbers.numbers" " but i cant get it working.

Can someone help me out? Dont have to be sed but i guess it would be the best for this task.
 
Old 03-20-2007, 06:56 AM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Regular expressions are not easy for beginners. When you master them, it is very powerfull.

Maybe this or this can help you:



Experiment a bit..


 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell scripting: Print output to logfile, error to logfile & screen stefanlasiewski Programming 18 05-22-2008 12:47 PM
pam_unix in logfile jkmartha Linux - Newbie 1 05-04-2005 09:40 PM
logfile analyse saavik Linux - Networking 4 03-30-2005 05:14 AM
Startup Logfile Wynand1 Linux - Newbie 1 06-01-2004 06:04 AM
I am looking for a LogFile Viewer dude4you Linux - Software 6 02-02-2004 04:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09: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