1- ---
2- description : CLI and log output formatting reference
3- keywords :
4- - format, formatting, output, templates, log
5- menu :
6- main :
7- parent : engine_admin
8- weight : 7
9- title : Format command and log output
10- ---
1+ <!-- [metadata]>
2+ +++
3+ title = "Format command and log output"
4+ description = "CLI and log output formatting reference"
5+ keywords = ["format, formatting, output, templates, log"]
6+ [menu. main]
7+ parent = " engine_admin"
8+ weight= 7
9+ +++
10+ <![end-metadata] -->
1111
1212# Formatting reference
1313
@@ -20,6 +20,7 @@ list of elements they support in their templates:
2020- [ Docker Log Tag formatting] ( logging/log_tags.md )
2121- [ Docker Network Inspect formatting] ( ../reference/commandline/network_inspect.md )
2222- [ Docker PS formatting] ( ../reference/commandline/ps.md#formatting )
23+ - [ Docker Stats formatting] ( ../reference/commandline/stats.md#formatting )
2324- [ Docker Volume Inspect formatting] ( ../reference/commandline/volume_inspect.md )
2425- [ Docker Version formatting] ( ../reference/commandline/version.md#examples )
2526
@@ -33,46 +34,34 @@ This is the complete list of the available functions with examples:
3334Join concatenates a list of strings to create a single string.
3435It puts a separator between each element in the list.
3536
36- {% raw %}
3737 $ docker ps --format '{{join .Names " or "}}'
38- {% endraw %}
3938
4039### Json
4140
4241Json encodes an element as a json string.
4342
44- {% raw %}
4543 $ docker inspect --format '{{json .Mounts}}' container
46- {% endraw %}
4744
4845### Lower
4946
5047Lower turns a string into its lower case representation.
5148
52- {% raw %}
5349 $ docker inspect --format "{{lower .Name}}" container
54- {% endraw %}
5550
5651### Split
5752
5853Split slices a string into a list of strings separated by a separator.
5954
60- {% raw %}
6155 # docker inspect --format '{{split (join .Names "/") "/"}}' container
62- {% endraw %}
6356
6457### Title
6558
6659Title capitalizes a string.
6760
68- {% raw %}
6961 $ docker inspect --format "{{title .Name}}" container
70- {% endraw %}
7162
7263### Upper
7364
74- Upper turns a string into its upper case representation.
65+ Upper turms a string into its upper case representation.
7566
76- {% raw %}
7767 $ docker inspect --format "{{upper .Name}}" container
78- {% endraw %}
0 commit comments