Group Summary of sed Commands (UNIX in a Nutshell: System V Edition)
10.4. Group Summary of sed Commands
In the lists below, the sed commands are grouped by function and
are described tersely. Full descriptions, including syntax and
examples, can be found afterward in the "Alphabetical Summary" section.
10.4.1. Basic Editing
a\Append text after a line.
c\Replace text (usually a text block).
i\Insert text before a line.
dDelete lines.
sMake substitutions.
yTranslate characters (like Unix tr).
10.4.2. Line Information
=Display line number of a line.
lDisplay control characters in ASCII.
pDisplay the line.
10.4.3. Input/Output Processing
nSkip current line and go to line below.
rRead another file's contents into the output stream.
wWrite input lines to another file.
qQuit the sed script (no further output).
10.4.4. Yanking and Putting
hCopy into hold space; wipe out what's there.
HCopy into hold space; append to what's there.
gGet the hold space back; wipe out the destination line.
GGet the hold space back; append to the pattern space.
xExchange contents of hold space and pattern space.
10.4.5. Branching Commands
bBranch to label or to end of script.
tSame as b, but branch only after substitution.
:labelLabel branched to by t or b.
10.4.6. Multiline Input Processing
NRead another line of input (creates embedded newline).
DDelete up to the embedded newline.
PPrint up to the embedded newline.
10.3. Syntax of sed Commands10.5. Alphabetical Summary of sed Commands
Copyright © 2003 O'Reilly & Associates. All rights reserved.
Wyszukiwarka
Podobne podstrony:
ch10 (9)ch10ch10CH10 (17)ch10ch10ch10BW ch10ch10ch10ch10ch10 (21)ch10ch10ch10ch10ch10więcej podobnych podstron