OS Manuals

/usr/bin/sed

GNU stream editor

From sed 4.10-r5 (os), captured 2026-11-05 by running sed --help (exit 0). permalink

Usage: /usr/bin/sed [OPTION]... {script-only-if-no-other-script} [input-file]...

  -n, --quiet, --silent
                 suppress automatic printing of pattern space
      --debug
                 annotate program execution
  -e script, --expression=script
                 add the script to the commands to be executed
  -f script-file, --file=script-file
                 add the contents of script-file to the commands to be executed
  --follow-symlinks
                 follow symlinks when processing in place
  -i[SUFFIX], --in-place[=SUFFIX]
                 edit files in place (makes backup if SUFFIX supplied)
  -l N, --line-length=N
                 specify the desired line-wrap length for the 'l' command
  --posix
                 disable all GNU extensions.
  -E, -r, --regexp-extended
                 use extended regular expressions in the script
                 (for portability use POSIX -E).
  -s, --separate
                 consider files as separate rather than as a single,
                 continuous long stream.
      --sandbox
                 operate in sandbox mode (disable e/r/w commands).
  -u, --unbuffered
                 load minimal amounts of data from the input files and flush
                 the output buffers more often
  -z, --null-data
                 separate lines by NUL characters
      --help     display this help and exit
      --version  output version information and exit

If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret.  All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.

GNU sed home page: <https://www.gnu.org/software/sed/>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
E-mail bug reports to: <bug-sed@gnu.org>.
Options (15)
OptionDescriptionSource
-n, --quiet, --silentsuppress automatic printing of pattern spacehelp + man
--debugannotate program executionhelp + man
-e, --expression scriptadd the script to the commands to be executedhelp + man
-f, --file script-fileadd the contents of script-file to the commands to be executedhelp + man
--follow-symlinksfollow symlinks when processing in placehelp + man
-i, --in-place SUFFIXedit files in place (makes backup if SUFFIX supplied)help + man
-l, --line-length Nspecify the desired line-wrap length for the 'l' commandhelp + man
--posixdisable all GNU extensions.help + man
-E, -r, --regexp-extendeduse extended regular expressions in the script (for portability use POSIX -E).help + man
-s, --separateconsider files as separate rather than as a single, continuous long stream.help + man
--sandboxoperate in sandbox mode (disable e/r/w commands).help + man
-u, --unbufferedload minimal amounts of data from the input files and flush the output buffers more oftenhelp + man
-z, --null-dataseparate lines by NUL charactershelp + man
--helpdisplay this help and exithelp + man
--versionoutput version information and exithelp + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.