tldr/pages/common/echo.md

24 lines
446 B
Markdown
Raw Normal View History

2014-05-11 14:20:51 +04:00
# echo
> Print given arguments.
2014-05-11 14:20:51 +04:00
- Print a text message. Note: quotes are optional:
2014-05-11 14:20:51 +04:00
`echo {{"Hello World"}}`
2014-05-11 14:20:51 +04:00
- Print a message with environment variables:
2014-05-11 14:20:51 +04:00
`echo {{"My path is $PATH"}}`
2016-07-21 16:52:49 +03:00
- Print a message without the trailing newline:
`echo -n {{"Hello World"}}`
2019-06-22 18:40:44 +03:00
- Append a message to the file:
`echo {{"Hello World"}} >> {{file.txt}}`
2016-07-21 16:52:49 +03:00
- Enable interpretation of backslash escapes (special characters):
`echo -e {{"Column 1\tColumn 2"}}`