$sed
Stream editor for filtering and transforming text using pattern substitutions.
sed [OPTIONS] SCRIPT [INPUT-FILE...]Live im interaktiven Terminal ausprobieren
Client-seitige Simulation ohne Installation mit sofortigem Feedback.
Ü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 / Option | Description |
|---|---|
| -i | Edit files in place directly instead of printing to stdout. |
| -e [script] | Add the script to the commands to be executed. |
| -n | Suppress automatic printing of pattern space. |
Praktische Anwendungsbeispiele
echo "localhost:3000" | sed "s/3000/8080/g"Replaces port 3000 with 8080 in the stream.
Verwandte Linux-Befehle
Suchen Sie nach Zeichenfolgenmustern oder regulären Ausdrücken in Textdateien.
Output the first part (top lines) of text files.
Output the last part (bottom lines) of files or stream real-time logs.
Print newline, word, and byte counts for files.
Print text strings or write data to files using shell redirection.
Pattern scanning and column text processing language.