home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 30.12 Saving Part of a File Chapter 30
vi Tips and Tricks
Next: 30.14 Moving Blocks of Text by Patterns
 

30.13 Appending to an Existing File

You can use the UNIX redirect and append operator (>> ) with w to append all or part of the contents of the buffer to an existing file. For example, if you entered:

:1,10w

 newfile

and then:

$
 
:340,$w >>

newfile

newfile would contain lines 1-10 and line 340 to the end of the buffer.

- TOR from O'Reilly & Associates' Learning the vi Editor , Chapter 5


Previous: 30.12 Saving Part of a File UNIX Power Tools Next: 30.14 Moving Blocks of Text by Patterns
30.12 Saving Part of a File Book Index 30.14 Moving Blocks of Text by Patterns

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System