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


UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: g Chapter 10
The Sed Editor
Next: Reference: h
 

G

[

address1

][

,



address2

]

G

Same as g , except that the hold space is pasted below the address instead of overwriting it. The example shows a simple way to "cut and paste" lines.

Example

This script collects all lines containing the word Item: and moves them after a place marker later in the file. The original Item: lines are deleted.

/Item:/{
H
d
}
/Summary of items:/G


Previous: Reference: g UNIX in a Nutshell: System V Edition Next: Reference: h
Reference: g Book Index Reference: h

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