sed |
---|
|
sed [ -n ] 'editing command' [ file ... ] |
---|
|
To edit its input stream, producing results on standard output, instead of modifying files in place the way an interactive editor does. Although sed has many commands and can do complicated things, it is most often used for performing text substitutions on an input stream, usually as part of a pipeline. |
---|
|
| Use editing command on the input data. -e must be used
when there are
multiple commands.
-f script-file
|
Read editing commands from script-file. This is useful
when there are
many commands to execute.
| -n
| Suppress the normal printing of each final modified
line. Instead, lines
must be printed explicitly with the p command.
| |
---|
|
This reads each line of each input file, or standard input if no files. For each line, sed executes every editing command that applies to the input line. The result is written on standard output (by default, or explicitly with the p command and the -n option). With no -e or -f options, sed treats the first argument as the editing command to use. |
---|