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

h

[address1 [, address2 ]]h

Copy the pattern space into the hold space, a special temporary buffer. The previous contents of the hold space are obliterated. You can use h to save a line before editing it.

Example

# Edit a line; print the change; replay the original
/Unix/{
h
s/.* Unix \(.*\) .*/\1:/
p
x
}

Sample input:

This describes the Unix ls command.
This describes the Unix cp command.

Sample output:

ls:
This describes the Unix ls command.
cp:
This describes the Unix cp command.


Previous: Reference: G UNIX in a Nutshell: System V Edition Next: Reference: H
Reference: G Book Index Reference: H

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










??????????????@Mail.ru