If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Remove pattern list and update

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-07-05, 19:11
steve_johnson steve_johnson is offline
Registered User
 
Join Date: Jan 2005
Posts: 4
Remove pattern list and update

I have a output file for my system logs monitor sent to Admin group every day ; Recently we see there are many external system disconnects, So we want to avoid them from the list of alerts.

If I have the avoid notification patterns on a file. How to eliminate them from o/p file.

The o/p file name is “syslog”; the avoid pattern is “RFCDestination”, "RFCDDC" . So I want to delete all RFCDestination lines from syslog file and send a alert. Is this easy?. Please advise.

The avoid pattern list file is created with RFCD....entries.

Can you please avdise using this avoid_pattern_lst delete entries in "syslog" and generate final file.
Reply With Quote
  #2 (permalink)  
Old 03-08-05, 01:12
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,454
grep -v RFCD syslog | mail admin_group@steve_johnson.com

By the way, what's "o/p"?
Reply With Quote
  #3 (permalink)  
Old 03-08-05, 02:54
steve_johnson steve_johnson is offline
Registered User
 
Join Date: Jan 2005
Posts: 4
Could you please how to do it for multiple pattern eliminations....like in a file iahve all not required patterns. the o/p is know as output.

thanks, Please advise
Reply With Quote
  #4 (permalink)  
Old 03-08-05, 09:34
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,454
man grep
.........................
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On