2012-07-03 17:54:00 -04:00
\section echo echo - display a line of text
\subsection echo-synopsis Synopsis
2014-08-01 13:25:41 +01:00
\fish{synopsis}
2014-08-08 03:44:37 +01:00
echo [OPTIONS] [STRING]
2014-08-01 03:37:32 +01:00
\endfish
2012-07-03 17:54:00 -04:00
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 15:56:01 +08:00
\subsection echo-description Description
2014-08-01 03:37:32 +01:00
`echo` displays a string of text.
Help cleanup
Large list of changes, including formatting and typos for most commands.
More substantive changes have been made to alias, bind, block, break,
builtin, case, cd, commandline, count, else, emit, fish_config, funced,
function, functions, history, math, mimedb, nextd, not, popd, prevd,
pushd, pwd, random, read, set, set_color, switch, test, trap, type,
ulimit, umask, and while.
2013-05-12 15:56:01 +08:00
The following options are available:
2014-08-01 03:37:32 +01:00
- `-n`, Do not output a newline
2014-08-19 13:41:23 +01:00
2014-08-01 03:37:32 +01:00
- `-s`, Do not separate arguments with spaces
2014-08-19 13:41:23 +01:00
2014-08-01 03:37:32 +01:00
- `-E`, Disable interpretation of backslash escapes (default)
2014-08-19 13:41:23 +01:00
2014-08-01 03:37:32 +01:00
- `-e`, Enable interpretation of backslash escapes
2014-08-19 13:41:23 +01:00
2013-03-05 17:37:44 -08:00
\subsection echo-escapes Escape Sequences
2014-08-01 03:37:32 +01:00
If `-e` is used, the following sequences are recognized:
- `\` backslash
2014-08-19 13:41:23 +01:00
2014-08-01 03:37:32 +01:00
- `\a` alert (BEL)
2014-08-19 13:41:23 +01:00
2014-08-01 03:37:32 +01:00
- `\b` backspace
2014-08-19 13:41:23 +01:00
2014-08-01 03:37:32 +01:00
- `\c` produce no further output
2014-08-19 13:41:23 +01:00
2014-08-01 03:37:32 +01:00
- `\e` escape
2014-08-19 13:41:23 +01:00
2014-08-01 03:37:32 +01:00
- `\f` form feed
2014-08-19 13:41:23 +01:00
2014-08-01 03:37:32 +01:00
- `\n` new line
2014-08-19 13:41:23 +01:00
2014-08-01 03:37:32 +01:00
- `\r` carriage return
2014-08-19 13:41:23 +01:00
2014-08-01 03:37:32 +01:00
- `\t` horizontal tab
2014-08-19 13:41:23 +01:00
2014-08-01 03:37:32 +01:00
- `\v` vertical tab
2014-08-19 13:41:23 +01:00
2014-08-01 03:37:32 +01:00
- `\0NNN` byte with octal value NNN (1 to 3 digits)
2014-08-19 13:41:23 +01:00
2014-08-01 03:37:32 +01:00
- `\xHH` byte with hexadecimal value HH (1 to 2 digits)
2013-03-05 17:37:44 -08:00
2012-07-03 17:54:00 -04:00
\subsection echo-example Example
2014-08-19 13:41:23 +01:00
\fish
echo 'Hello World'
2014-09-27 16:56:13 -07:00
\endfish
Print hello world to stdout
2013-03-05 17:37:44 -08:00
2014-09-27 16:56:13 -07:00
\fish
2016-04-23 12:26:57 -07:00
echo -e 'Top\\nBottom'
2014-08-19 13:41:23 +01:00
\endfish
2014-09-27 16:56:13 -07:00
Print Top and Bottom on separate lines, using an escape sequence