[prev] [index] [next]

sed: stream editor

The sed command provides the power of interactive-style editing in "filter-mode".

Invocation:

sed -e 'EditCommands' DataFile
sed -f EditCommandFile DataFile

How sed works:

  • read each line of input
  • check if it matches any patterns or line-ranges
  • apply related editing commands to the line
  • write the transformed line to output