LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-10-2004, 04:39 PM   #1
dtheorem
Member
 
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, 05:41 PM   #2
ugge
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
 
  


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 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 11:41 PM
question re: search - priority of parameters secesh LQ Suggestions & Feedback 0 02-05-2005 11:43 AM
gawk question luxpops Programming 1 09-12-2004 05:46 AM
How to search for asterisks using gawk dtheorem Linux - General 1 03-05-2004 03:35 PM
FS=? in gawk realos Programming 2 05-28-2003 08:30 PM


All times are GMT -5. The time now is 11:29 PM.

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