mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-01 00:35:15 +08:00
doc: add interlinks between echo
←→ printf
commands
This commit is contained in:
parent
593c43663c
commit
8530a4bd9e
|
@ -57,18 +57,19 @@ If ``-e`` is used, the following sequences are recognized:
|
|||
Example
|
||||
-------
|
||||
|
||||
|
||||
|
||||
::
|
||||
|
||||
echo 'Hello World'
|
||||
|
||||
Print hello world to stdout
|
||||
|
||||
|
||||
|
||||
::
|
||||
|
||||
echo -e 'Top\\nBottom'
|
||||
|
||||
Print Top and Bottom on separate lines, using an escape sequence
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- the :ref:`printf <cmd-printf>` command, for more control over output formatting
|
||||
|
|
|
@ -66,18 +66,19 @@ This file has been imported from the printf in GNU Coreutils version 6.9. If you
|
|||
Example
|
||||
-------
|
||||
|
||||
|
||||
|
||||
::
|
||||
|
||||
printf '%s\\t%s\\n' flounder fish
|
||||
|
||||
Will print "flounder fish" (separated with a tab character), followed by a newline character. This is useful for writing completions, as fish expects completion scripts to output the option followed by the description, separated with a tab character.
|
||||
|
||||
|
||||
|
||||
::
|
||||
|
||||
printf '%s: %d' "Number of bananas in my pocket" 42
|
||||
|
||||
Will print "Number of bananas in my pocket: 42", _without_ a newline.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- the :ref:`echo <cmd-echo>` command, for simpler output
|
||||
|
|
Loading…
Reference in New Issue
Block a user