Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 04-19-2003, 11:24 PM   #1
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, 12:01 AM   #2
Registered: Feb 2003
Distribution: Slackware
Posts: 78

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

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

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


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

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

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