diff options
Diffstat (limited to 'distro/common/man/man1/knife-xargs.1')
-rw-r--r-- | distro/common/man/man1/knife-xargs.1 | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/distro/common/man/man1/knife-xargs.1 b/distro/common/man/man1/knife-xargs.1 index 245aa346ff..67ee6cf959 100644 --- a/distro/common/man/man1/knife-xargs.1 +++ b/distro/common/man/man1/knife-xargs.1 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KNIFE-XARGS" "1" "Chef 11.14" "" "knife xargs" +.TH "KNIFE-XARGS" "1" "Chef 11.16" "" "knife xargs" .SH NAME knife-xargs \- The man page for the knife xargs subcommand. . @@ -31,7 +31,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .sp -The \fBknife xargs\fP subcommand is used to build and execute command lines against objects on a Chef server using standard input. +The \fBknife xargs\fP subcommand is used to take patterns from standard input, download as JSON, run a command against the downloaded JSON, and then upload any changes. .sp \fBSyntax\fP .sp @@ -53,7 +53,7 @@ This subcommand has the following options: .INDENT 0.0 .TP .B \fB\-0\fP -Indicates that a \fBNULL\fP character (\fB\e0\fP) will be used as a separator, instead of white space. Default: \fBfalse\fP\&. +Use to show a \fBNULL\fP character (\fB\e0\fP) instead of white space as the separator. Default: \fBfalse\fP\&. .TP .B \fB\-\-chef\-repo\-path PATH\fP The path to the chef\-repo\&. This setting will override the default path to the chef\-repo\&. Default: same as specified by \fBchef_repo_path\fP in config.rb. @@ -77,7 +77,7 @@ Use to define a string that will be used to replace all occurrences of a file na Use to define a string that will be used to replace the first occurrence of a file name. Default: \fBnil\fP\&. .TP .B \fB\-\-local\fP -Indicates that a command line will be built or executed against a local file. Set to \fBfalse\fP to build or execute against a remote file. Default: \fBfalse\fP\&. +Use to build or execute a command line against a local file. Set to \fBfalse\fP to build or execute against a remote file. Default: \fBfalse\fP\&. .TP .B \fB\-n MAX_ARGS\fP, \fB\-\-max\-args MAX_ARGS\fP The maximum number of arguments per command line. Default: \fBnil\fP\&. @@ -92,7 +92,7 @@ The layout of the local chef\-repo\&. Possible values: \fBstatic\fP, \fBeverythi The maximum size (in characters) for a command line. Default: \fBnil\fP\&. .TP .B \fB\-t\fP -Indicates that the print command will be run on the command line. Default: \fBnil\fP\&. +Use to run the print command on the command line. Default: \fBnil\fP\&. .TP .B \fB\-c CONFIG_FILE\fP, \fB\-\-config CONFIG_FILE\fP The configuration file to use. @@ -104,7 +104,7 @@ The port on which chef\-zero will listen. Use to prevent the $EDITOR from being opened and to accept data as\-is. .TP .B \fB\-\-defaults\fP -Use to have Knife use the default value instead of asking a user to provide one. +Use to have knife use the default value instead of asking a user to provide one. .TP .B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP The $EDITOR that is used for all interactive commands. @@ -119,7 +119,7 @@ The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, Shows help for the command. .TP .B \fB\-k KEY\fP, \fB\-\-key KEY\fP -The private key that Knife will use to sign requests made by the API client to the Chef server\&. +The private key that knife will use to sign requests made by the API client to the Chef server\&. .TP .B \fB\-\-[no\-]color\fP Use to view colored output. @@ -131,7 +131,7 @@ Use to show data after a destructive operation. The URL for the Chef server\&. .TP .B \fB\-u USER\fP, \fB\-\-user USER\fP -The user name used by Knife to sign requests made by the API client to the Chef server\&. Authentication will fail if the user name does not match the private key. +The user name used by knife to sign requests made by the API client to the Chef server\&. Authentication will fail if the user name does not match the private key. .TP .B \fB\-v\fP, \fB\-\-version\fP The version of the chef\-client\&. @@ -140,19 +140,45 @@ The version of the chef\-client\&. Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity. .TP .B \fB\-y\fP, \fB\-\-yes\fP -Use to respond to all confirmation prompts with "Yes". Knife will not ask for confirmation. +Use to respond to all confirmation prompts with "Yes". knife will not ask for confirmation. .TP .B \fB\-z\fP, \fB\-\-local\-mode\fP Use to run the chef\-client in local mode. This allows all commands that work against the Chef server to also work against the local chef\-repo\&. .UNINDENT .sp \fBExamples\fP +.sp +The following examples show various ways of listing all nodes on the server, and then using Perl to replace \fBgrantmc\fP with \fBgmc\fP: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +$ knife list \(aqnodes/*\(aq | knife xargs perl \-ex "s/grantmc/gmc" +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +or without quotes and the backslash escaped: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +$ knife list /nodes/\e* | knife xargs perl \-ex "s/grantmc/gmc" +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +or by using the \fB\-\-pattern\fP option: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C -$ knife deps nodes/*.json | xargs knife upload +$ knife xargs \-\-pattern \(aq/nodes.*\(aq perl \-ex "s/grantmc/gmc" .ft P .fi .UNINDENT |