sed is a stream editor that performs a set of actions on every line of its input. This allows sed to be used as a filter. The basic syntax of a sed command is
sed 'script' files
Here files is a list of one or more files, and script is one or more commands of the form
where pattern is a regular expression and action is one of the commands given in Table 16.4. If pattern is omitted, action is performed for every line of input.
|p||Prints the line (p as in print)|
|d||Deletes the line (d as in delete)|
|s||Substitutes one expression with another (s as in substitute)|
Let's start with the simplest feature available in sed—printing a line that ...