2012-07-04 05:54:00 +08:00
|
|
|
\section echo echo - display a line of text
|
|
|
|
|
|
|
|
\subsection echo-synopsis Synopsis
|
2014-08-01 20:25:41 +08:00
|
|
|
\fish{synopsis}
|
2014-08-08 10:44:37 +08:00
|
|
|
echo [OPTIONS] [STRING]
|
2014-08-01 10:37:32 +08:00
|
|
|
\endfish
|
2012-07-04 05:54:00 +08: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 10:37:32 +08: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 10:37:32 +08:00
|
|
|
- `-n`, Do not output a newline
|
2014-08-19 20:41:23 +08:00
|
|
|
|
2014-08-01 10:37:32 +08:00
|
|
|
- `-s`, Do not separate arguments with spaces
|
2014-08-19 20:41:23 +08:00
|
|
|
|
2014-08-01 10:37:32 +08:00
|
|
|
- `-E`, Disable interpretation of backslash escapes (default)
|
2014-08-19 20:41:23 +08:00
|
|
|
|
2014-08-01 10:37:32 +08:00
|
|
|
- `-e`, Enable interpretation of backslash escapes
|
2014-08-19 20:41:23 +08:00
|
|
|
|
2013-03-06 09:37:44 +08:00
|
|
|
\subsection echo-escapes Escape Sequences
|
|
|
|
|
2014-08-01 10:37:32 +08:00
|
|
|
If `-e` is used, the following sequences are recognized:
|
|
|
|
|
|
|
|
- `\` backslash
|
2014-08-19 20:41:23 +08:00
|
|
|
|
2014-08-01 10:37:32 +08:00
|
|
|
- `\a` alert (BEL)
|
2014-08-19 20:41:23 +08:00
|
|
|
|
2014-08-01 10:37:32 +08:00
|
|
|
- `\b` backspace
|
2014-08-19 20:41:23 +08:00
|
|
|
|
2014-08-01 10:37:32 +08:00
|
|
|
- `\c` produce no further output
|
2014-08-19 20:41:23 +08:00
|
|
|
|
2014-08-01 10:37:32 +08:00
|
|
|
- `\e` escape
|
2014-08-19 20:41:23 +08:00
|
|
|
|
2014-08-01 10:37:32 +08:00
|
|
|
- `\f` form feed
|
2014-08-19 20:41:23 +08:00
|
|
|
|
2014-08-01 10:37:32 +08:00
|
|
|
- `\n` new line
|
2014-08-19 20:41:23 +08:00
|
|
|
|
2014-08-01 10:37:32 +08:00
|
|
|
- `\r` carriage return
|
2014-08-19 20:41:23 +08:00
|
|
|
|
2014-08-01 10:37:32 +08:00
|
|
|
- `\t` horizontal tab
|
2014-08-19 20:41:23 +08:00
|
|
|
|
2014-08-01 10:37:32 +08:00
|
|
|
- `\v` vertical tab
|
2014-08-19 20:41:23 +08:00
|
|
|
|
2014-08-01 10:37:32 +08:00
|
|
|
- `\0NNN` byte with octal value NNN (1 to 3 digits)
|
2014-08-19 20:41:23 +08:00
|
|
|
|
2014-08-01 10:37:32 +08:00
|
|
|
- `\xHH` byte with hexadecimal value HH (1 to 2 digits)
|
2013-03-06 09:37:44 +08:00
|
|
|
|
2012-07-04 05:54:00 +08:00
|
|
|
\subsection echo-example Example
|
|
|
|
|
2014-08-19 20:41:23 +08:00
|
|
|
\fish
|
|
|
|
echo 'Hello World'
|
2014-09-28 07:56:13 +08:00
|
|
|
\endfish
|
|
|
|
Print hello world to stdout
|
2013-03-06 09:37:44 +08:00
|
|
|
|
2014-09-28 07:56:13 +08:00
|
|
|
\fish
|
2016-04-24 03:26:57 +08:00
|
|
|
echo -e 'Top\\nBottom'
|
2014-08-19 20:41:23 +08:00
|
|
|
\endfish
|
2014-09-28 07:56:13 +08:00
|
|
|
Print Top and Bottom on separate lines, using an escape sequence
|