$echo
Print text strings or write data to files using shell redirection.
echo [OPTIONS] [STRING...]Live im interaktiven Terminal ausprobieren
Client-seitige Simulation ohne Installation mit sofortigem Feedback.
Überblick & Funktionsweise
`echo` displays strings of text to standard output. When paired with `>` (overwrite) or `>>` (append) redirection operators, `echo` is the most common way to create config files, append environment variables, or print script debug statuses.
Wichtige Optionen und Flags
| Flag / Option | Description |
|---|---|
| -e | Enable interpretation of backslash escapes (e.g., \n for newline, \t for tab). |
| -n | Do not output the trailing newline character. |
Praktische Anwendungsbeispiele
echo "API_PORT=8080" > /home/user/.env && cat /home/user/.envCreates or overwrites .env with API_PORT=8080.
Verwandte Linux-Befehle
Suchen Sie nach Zeichenfolgenmustern oder regulären Ausdrücken in Textdateien.
Dateiinhalte verketten und auf der Standardausgabe ausgeben.
Create empty files or update file access and modification timestamps.
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.