$echo
Print text strings or write data to files using shell redirection.
echo [OPTIONS] [STRING...]Попробуйте в интерактивной песочнице
Клиентская симуляция без установки с мгновенным результатом.
Обзор и принцип работы
`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.
Основные флаги и параметры команды
| 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. |
Практические примеры использования
echo "API_PORT=8080" > /home/user/.env && cat /home/user/.envCreates or overwrites .env with API_PORT=8080.
Похожие команды Linux
Поиск текстовых шаблонов и регулярных выражений внутри файлов и потоков данных.
Чтение и объединение содержимого файлов с выводом в терминал.
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.