mirror of https://github.com/docker/docs.git
Add note to formatting section (#11326)
* Add note to formatting section * Add note to formatting section * Fix the double quote to single quote * Fix description * Minor style updates Co-authored-by: Maximillian Fan Xavier <maximillianfx@ibm.com> Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com>
This commit is contained in:
parent
fa0663ea89
commit
0c55a6ddcf
|
@ -14,6 +14,28 @@ All of these examples use the `docker inspect` command, but many other CLI
|
||||||
commands have a `--format` flag, and many of the CLI command references
|
commands have a `--format` flag, and many of the CLI command references
|
||||||
include examples of customizing the output format.
|
include examples of customizing the output format.
|
||||||
|
|
||||||
|
>**Note**
|
||||||
|
>
|
||||||
|
> Whe using the `--format` flag, you need observe your shell environment.
|
||||||
|
> In a Posix shell, you can run the following with a single quote:
|
||||||
|
>
|
||||||
|
> {% raw %}
|
||||||
|
> ```bash
|
||||||
|
> docker inspect --format '{{join .Args " , "}}'
|
||||||
|
> ```
|
||||||
|
> {% endraw %}
|
||||||
|
>
|
||||||
|
> Otherwise, in a Windows shell (for example, PowerShell), you need to use single quotes, but
|
||||||
|
> escape the double quotes inside the params as follows:
|
||||||
|
>
|
||||||
|
> {% raw %}
|
||||||
|
> ```bash
|
||||||
|
> docker inspect --format '{{join .Args \" , \"}}'
|
||||||
|
> ```
|
||||||
|
> {% endraw %}
|
||||||
|
>
|
||||||
|
{:.important}
|
||||||
|
|
||||||
## join
|
## join
|
||||||
|
|
||||||
`join` concatenates a list of strings to create a single string.
|
`join` concatenates a list of strings to create a single string.
|
||||||
|
|
Loading…
Reference in New Issue