copied table 4.2 from chapter 4: filters of unix programmer's environment book

This commit is contained in:
tomit4 2022-05-04 12:33:57 -07:00
parent 4bd472ef3d
commit 154b25e40c

22
sed.txt Normal file
View file

@ -0,0 +1,22 @@
----------------------------- Table 4.2 -----------------------------
Summary of sed Commands
a\ append lines to output until one not ending in \
b label branch to command : label
c\ change lines to following text as in a
d delete line; read next input line
i\ insert following text before next output
l list line, making all non-printing characters visible
p print line
q quit
r file read file, copy contents to output
s/old/new/f substitute new for old. If f=g, replace all occurrences;
f=p, print; f=w file, write to file
t label test: branch to label if substitution made to current line
w file write line to file
y/str1/str2 replace each character from str1 with corresponding
character from str2 (no ranges allowed)
= print current input line number
!cmd do sed cmd only if line is not selected
: label set label for b and t Commands
{ treat commands up to matching } as a group