Online Linux Terminal Logo
OnlineLinuxTerminal
TextverarbeitungCLI Manual

$sed

Stream editor for filtering and transforming text using pattern substitutions.

BefehlssyntaxPOSIX Standard
sed [OPTIONS] SCRIPT [INPUT-FILE...]
Linux-Community2.4k Online

Tausche dich mit Linux-Nutzern aus, lerne Befehle und lade PDF-Cheatsheets herunter.

Live im interaktiven Terminal ausprobieren

Client-seitige Simulation ohne Installation mit sofortigem Feedback.

Im Vollbild-Terminal öffnen ↗
bash — terminal

Überblick & Funktionsweise

`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.

Wichtige Optionen und Flags

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.

Praktische Anwendungsbeispiele

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

Replaces port 3000 with 8080 in the stream.