![]() |
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 |
| 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 |
| Removing specific lines | catgovind | Shell Programming and Scripting | 3 | 04-30-2008 05:40 AM |
| Inserting Lines between data sets using SED? | selkirk | Shell Programming and Scripting | 1 | 09-25-2007 02:24 AM |
| How to print specific lines with awk | Bugenhagen | Shell Programming and Scripting | 10 | 08-16-2007 06:41 AM |
| Printing lines with specific awk NF | jehrome_rando | Shell Programming and Scripting | 1 | 03-13-2007 04:23 AM |
| viewing specific lines | dakid | UNIX for Dummies Questions & Answers | 3 | 05-25-2006 03:25 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Inserting specific lines in vi
How can I insert, say lines 500 - 700 from another file into the current file on the current line (cursor) that I am editing while in vi (AIX).
I know how to insert the entire file but how do you do it when you only need certain lines from a huge file? I've referenced my Unix Unleash book but it doesn't say... Thanx |
|
|||||
|
here's another solution, but you'll need a vi-clone that
supports multiple 'windows' (e.g Vim, Elvis etc..): $ vi currentfile :split anotherfile highlight lines 500 - 700 500G V 700G d Insert lines in current file Move down to the other file (^wj) and press: p ![]() |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|