sed

GNU stream editor for filtering and transforming text. See also: awk, ed. More information: https://www.gnu.org/software/sed/manual/sed.html.

{{command}} | sed 's/apple/mango/g'

{{command}} | sed {{[-E|--regexp-extended]}} 's/(apple)/\U\1/g'

sed {{[-i|--in-place]}} -e 's/apple/mango/g' -e 's/orange/lime/g' {{path/to/file}}

{{command}} | sed {{[-f|--file]}} {{path/to/script.sed}}

{{command}} | sed {{[-n|--quiet]}} '1p'

sed {{[-i|--in-place=]}}{{.orig}} '1,5d' {{path/to/file}}

sed {{[-i|--in-place]}} '1i\your new line text\' {{path/to/file}}

sed {{[-i|--in-place]}} '/^[[:space:]]*$/d' {{path/to/file}}