4.5. Commands and Options

Sed commands tell sed how to process each line of input specified by an address. If an address is not given,sed processes every line of input. If a sed command is preceded by an exclamation point (!), the negation operator, the command affects every line not selected by the address(es) The % is the shell prompt. See Table 4.1 for a list of sed commands and what they do, and see Table 4.2 for a list of options and how they control sed's behavior. With the -h option, sed displays a list of its command line options and a short description of what each one does.

Example 4.3.
% sed -h Usage: sed [OPTION]… {script-only-if-no-other-script} [input-file]… -n, --quiet, --silent suppress automatic printing of pattern space -e ...

Get Linux Shells by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.