![]() |
|
|
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 string during a specific time frame | tadi18 | Shell Programming and Scripting | 1 | 04-27-2009 11:12 AM |
| search a line and insert string into specific at position | daikeyang | Shell Programming and Scripting | 9 | 03-21-2009 12:56 PM |
| Search for string and return lines above and below | doza22 | UNIX for Dummies Questions & Answers | 7 | 03-18-2009 12:52 PM |
| Print lines with search string at specific position | HealthyGuy | Shell Programming and Scripting | 4 | 12-04-2006 09:47 AM |
| Search all files for specific string | sureshy | UNIX for Dummies Questions & Answers | 4 | 03-06-2002 12:28 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Search for string between specific lines of code in vi
Hi,
I am on an AIX Unix box and I am trying to search for a string in between specified lines of code when I vi a file. I can use the '/string' to search for the string through out the file, but can we only search in between specific lines. I can use the below sed command to search for the string between line numbers 1594 and 1857, but I was curious to know if there is any other way I could do the same when I vi the file ? Code:
sed -n "1594,1857p" name.ksh | grep string | more Thanks, Coolavi Last edited by Yogesh Sawant; 07-15-2009 at 02:57 AM.. Reason: added code tags |
| Bookmarks |
| Tags |
| lines, search, vi |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|