|
|
sed reads its standard input a line at a time, carries out whatever editing changes are specified, then writes the changed lines to its output. It acts as a filter on the input file, which streams through it.
How sed works
To use sed, you need to specify the name of the command
file that contains your editing script, then the file or files that
you are processing. For example:
sed -f editscript <inputfile >outputfile
sed -e "/Hello/s/Hello/Hi/g" <letter.old >letter.new
Three optional flags are recognized on the command line: