Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 03-10-2004, 03:39 PM   #1
Registered: Sep 2003
Location: Winnipeg, MB, CA
Distribution: LinuxMint
Posts: 101

Rep: Reputation: 15
gawk search parameters

I've been trying to find out how to search a file for a particular line containing two string expressions. Specifically, I want to search a text file for those lines containing the the word "Error" and NOT the word "ignored". Anybody know? I search for the word "Error" like so:

gawk '/Error/' error >> realerror
Old 03-10-2004, 04:41 PM   #2
Senior Member
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
Try this one
gawk '/Error/ && !/ignored/' error >> realerror


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
where is curl and gawk ???????? bozart ROCK 11 10-23-2005 10:41 PM
question re: search - priority of parameters secesh LQ Suggestions & Feedback 0 02-05-2005 10:43 AM
gawk question luxpops Programming 1 09-12-2004 04:46 AM
How to search for asterisks using gawk dtheorem Linux - General 1 03-05-2004 02:35 PM
FS=? in gawk realos Programming 2 05-28-2003 07:30 PM

All times are GMT -5. The time now is 03:43 PM.

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