![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Search for a pattern in part of the line | pineapples | Shell Programming and Scripting | 6 | 09-10-2008 11:42 AM |
| search for the matched pattern by tracing back from the line | Sharmila_P | Shell Programming and Scripting | 9 | 08-04-2008 09:21 AM |
| Multile Pattern Search in a same line and delete | sasree76 | Shell Programming and Scripting | 2 | 04-16-2008 03:12 PM |
| Perl onliner to search the last line with an occurence of a pattern | ammu | Shell Programming and Scripting | 4 | 01-31-2008 01:09 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 |
|
|
|
||||
|
modify a particular pattern starting from second line of the search pattern
Hi,
I am new to this forum and i would like to get help in this issue. I have a file 1.txt as shown: apple banana orange apple grapes banana orange grapes orange .... Now i would like to search for pattern say apple or orange and then put a # at the beginning of the pattern from second line i.e, for the first matched pattern/first line ignore and then from second matched pattern/second line and so on put a # at the beginning of the pattern. Your help is appreciated. Thanks. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|