Online Linux Terminal Logo
OnlineLinuxTerminal
Procesamiento de textoCLI Manual

$sed

Stream editor for filtering and transforming text using pattern substitutions.

Sintaxis del comandoPOSIX Standard
sed [OPTIONS] SCRIPT [INPUT-FILE...]
Comunidad Linux2.4k En línea

Chatea con usuarios de Linux, aprende comandos y descarga guías PDF.

Prueba en vivo en la terminal interactiva

Simulación del lado del cliente sin instalación y con respuesta inmediata.

Abrir en terminal de pantalla completa ↗
bash — terminal

Descripción general y funcionamiento

`sed` (Stream Editor) performs basic text transformations on an input stream or file. Its most famous capability is search-and-replace using the `s/find/replace/g` syntax, allowing automated batch editing of source code and configurations without opening a visual editor.

Opciones y banderas comunes

Flag / OptionDescription
-iEdit files in place directly instead of printing to stdout.
-e [script]Add the script to the commands to be executed.
-nSuppress automatic printing of pattern space.

Ejemplos prácticos del mundo real

#1Substitute string patterns in text output
echo "localhost:3000" | sed "s/3000/8080/g"

Replaces port 3000 with 8080 in the stream.