SED - Stream
Editor
Usage
•Reads one
line at a time from input files
•Applies
the commands from a list of commands one at a
time, in order, to each line
•writes to
standard output
Usage
sed ‘list of
ed
commands’ filenames...
Example
sed
‘s/UNIX/UNIX(TM)/g’ filenames
replaces
UNIX by UNIX(TM) in all the file occurences and
writes the result to standard output
COMMANDS
a\ text Appends
text on the output before reading the next
input line
b label Branch to the : command bearing the label
c\ text change lines to the following text
d delete line; read next input line
p print
r read
w write
q quit
No comments:
Post a Comment