From c333f062ddcba9b35330647bf6cbd0a07f2d786e Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 11 May 2017 14:55:55 +0200 Subject: New upstream version 1.8.0 --- man/nmcli-examples.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'man/nmcli-examples.xml') diff --git a/man/nmcli-examples.xml b/man/nmcli-examples.xml index 864e6504..0b15f112 100644 --- a/man/nmcli-examples.xml +++ b/man/nmcli-examples.xml @@ -254,6 +254,25 @@ B,DISPATCH + Convenient field values retrieval for scripting +$ nmcli -g ip4.address connection show my-con-eth0 +192.168.1.12/24 +$ nmcli -g ip4.address,ip4.dns connection show my-con-eth0 +192.168.1.12/24 +192.168.1.1 +$ nmcli -g ip4 connection show my-con-eth0 +IP4:192.168.1.12/24:192.168.1.1::192.168.1.1:: + + This example shows retrieval of ip4 connection field values via the --get-values + option. Multiple comma separated fields can be provided: they will be printed one + per line. If a whole section is provided instead of a single field, the name of the + section will be printed followed by all the related field values on the same line. + See also --terse, --mode, --fields and --escape options in nmcli1 + manual page for more customized output. + + + + Escaping colon characters in tabular mode $ nmcli -t -f general -e yes -m tab dev show eth0 GENERAL:eth0:ethernet:Intel Corporation:82567LM Gigabit Network Connection: -- cgit 1.3.0-6-gf8a5