O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

sed

Edits a file (not interactively)

sed [-n] -f script-file [file-list]

sed [-n] script [file-list]

The sed (stream editor) utility is a batch (noninteractive) editor. The sed commands are usually stored in a script-file (the first format), although you can give simple sed commands from the command line (second format). By default, sed copies lines from the file-list to standard output, editing the lines in the process. This utility selects lines to be edited by position within the file (line number) or context (pattern matching). Refer to the sed info page for complete documentation.

The sed utility takes its input from files you specify on the command line or from standard input. Unless you direct output from a sed script elsewhere, it goes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required