Tuesday, October 2, 2012

Unix - SED - Stream Editor

SED  -   Stream Editor


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

Hyderabad Trip - Best Places to visit

 Best Places to Visit  in Hyderabad 1.        1. Golconda Fort Maps Link :   https://www.google.com/maps/dir/Aparna+Serene+Park,+Masj...