![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can you delete records in a file matching a pattern? | mode09 | UNIX for Dummies Questions & Answers | 2 | 07-15-2008 02:53 PM |
| Pattern matching for file | doitnow | Shell Programming and Scripting | 0 | 06-20-2008 08:02 AM |
| Reading lines in a file matching a pattern | torenji | Shell Programming and Scripting | 4 | 10-25-2007 05:15 AM |
| getting file words as pattern matching | arunkumar_mca | High Level Programming | 5 | 05-31-2005 04:28 AM |
| pattern matching and print with sed | nymus7 | Shell Programming and Scripting | 2 | 04-14-2005 10:36 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Pattern matching in Duplicated file and print once
Dear Experts,
I have many alarms appeared in a file twice, i want to grep them with this info EVTTIME & DOMAIN, and print them in second file with 1 occurance. I have tried uniq -d test.txt > newfile and awk '!arr[$0]++' test.txt > newfile both are not working Please help me with this!!! For example i want to grep this info to filter out 1 message: EVTTIME="2008/07/04 17:54:48" OMAIN="alcomc2_BSS_67"EVTTYPE="EQUIPMENT":SEV="MAJOR":FRDNAME="MGH689E__MGWMGH_1 HWY3756__H_KauChwkSarwrShahed_1 tre 6":SPECPB="172181 , RX-TX [10] HW-FAILURE [239]":EVTTIME="2008/07/04 17:54:48" OMAIN="alcomc2_BSS_67":ADDTEXT="Object-Class % SBLObject-Instance % EVTTYPE="EQUIPMENT":SEV="MAJOR":FRDNAME="MGH689E__MGWMGH_1 HWY3756__H_KauChwkSarwrShahed_1 tre 6":SPECPB="172181 , RX-TX [10] HW-FAILURE [239]":EVTTIME="2008/07/04 17:54:48" OMAIN="alcomc2_BSS_67":ADDTEXT="Object-Class % SBLObject-Instance % Thanks and Best Regards, |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|