SEDis a Unix utility which parses text files and implements a programming language which can apply textual transformations to such files. It reads input files line by line (sequentially), applying the operation which has been specified via the command line (or a sed script), and then outputs the line. Below are some examples on how SED is normally used.
replace a string, save in a new file:
sed -e 's/VMS/Unix/g' file > file.new
delete all lines starting with "Novell":
sed -e '/^Novell/d' file > file.new
Sunday, May 3, 2009
SED examples
Labels:
UNIX
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment