![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 do I search for 2 strings (AND operator) ? | Kartheg | UNIX for Dummies Questions & Answers | 14 | 09-11-2009 04:44 PM |
| how to search with 2 strings. | syamkp | Shell Programming and Scripting | 2 | 03-10-2008 04:50 AM |
| search a logfile for strings | amitrajvarma | UNIX for Dummies Questions & Answers | 0 | 11-25-2007 10:09 AM |
| awk search for Quoted strings (') | kprattip | Shell Programming and Scripting | 13 | 07-10-2007 03:30 PM |
| Search for strings | lesstjm | UNIX for Dummies Questions & Answers | 5 | 04-26-2002 09:58 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Search between strings with an OR
Hi have Input in this way
KEY AAAA BBBB END1 KEY AAAA BBBB END2 KEY AAAA BBBB END3 I need to find any thing matching in between KEY And ending with "END1|END2|END3" This didnot work awk '/KEY/,/END1|END2|END3/' how can we do this... |
|
||||
|
Quote:
Code:
awk -v RS="" -v ORS="\n\n" ' /^KEY/ && ( /END/ || /CLOSE/ || /FILEEND/ ) ' file |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|