![]() |
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 |
| grep for a particular pattern and remove few lines above top and bottom of the patter | fed.linuxgossip | Shell Programming and Scripting | 17 | 07-25-2008 08:29 AM |
| SED Search Pattern and Replace with the Pattern | racbern | Shell Programming and Scripting | 4 | 03-15-2008 05:59 AM |
| Search for a pattern | DNAx86 | Shell Programming and Scripting | 26 | 03-12-2008 07:03 AM |
| Search for a pattern from the result of search | boopathi_d | Shell Programming and Scripting | 3 | 12-05-2007 09:54 AM |
| Search file for pattern and grab some lines before pattern | frustrated1 | Shell Programming and Scripting | 2 | 12-22-2005 03:41 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to search for a pattern from bottom to top.
Hi,
I have a file, which is having a pattern "SEARCH" somewhere towards end of the file, if i am giving " grep -i "SEARCH" $File" , it is taking too much time as file is very big. So i want to search for the pattern from the back side of the file, how can we search for a pattern in bottom to top of a file. Thanks |
|
||||
|
if you do not have tac or -r option from cat, you can just use tail. make a loop and keep tailing and grepping until you find the search pattern.
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|