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