LinuxQuestions.org
Register a domain and help support LQ
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 04-20-2003, 12:24 AM   #1
Gantrep
Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 78

Rep: Reputation: 15
regular expression question


how would I grep (or perhaps sed?) a file for every line not starting with a certain phrase?
 
Old 04-20-2003, 01:01 AM   #2
Gantrep
Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 78

Original Poster
Rep: Reputation: 15
nevermind. I used awk.


awk '$1 !~ /192.168.|127.0.0.1/ {print $1}' access_log | more
 
Old 04-20-2003, 05:24 PM   #3
azornoz
Member
 
Registered: Apr 2003
Posts: 52

Rep: Reputation: 15
egrep -v "^192.168.|127.0.0.1" access_log|more
 
  


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
Regular expression question gauge73 Linux - General 5 10-28-2005 12:33 PM
Regular expression question gauge73 Linux - General 2 10-28-2005 10:32 AM
regular expression question zero79 Linux - Software 1 07-11-2005 08:03 PM
Regular expression question. groentebroer Programming 2 11-29-2004 10:15 PM
Regular expression question - John Sloan Linux - Software 1 09-08-2004 01:33 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration