App-UpfUtils
view release on metacpan or search on metacpan
script/upf-modify-group view on Meta::CPAN
#!perl
# Note: This script is a CLI for Riap function /Unix/Passwd/File/modify_group
# and generated automatically using Perinci::CmdLine::Gen version 0.496
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2020-04-29'; # DATE
our $DIST = 'App-UpfUtils'; # DIST
our $VERSION = '0.060'; # VERSION
use 5.010001;
use strict;
use warnings;
use Perinci::CmdLine::Any;
my $cmdline = Perinci::CmdLine::Any->new(
url => "/Unix/Passwd/File/modify_group",
program_name => "upf-modify-group",
read_config => 0,
read_env => 0,
);
$cmdline->run;
# ABSTRACT: Modify an existing group
# PODNAME: upf-modify-group
__END__
=pod
=encoding UTF-8
=head1 NAME
upf-modify-group - Modify an existing group
=head1 VERSION
This document describes version 0.060 of upf-modify-group (from Perl distribution App-UpfUtils), released on 2020-04-29.
=head1 SYNOPSIS
Usage:
% upf-modify-group [--admins=s] [--backup] [--encpass=s] [--etc-dir=s]
[--format=name] [--gid=s] [--json] [--members=s] [--(no)naked-res]
[--no-backup] [--nobackup] [--page-result[=program]] [--pass=s]
<group>
=head1 DESCRIPTION
Specify arguments to modify corresponding fields. Unspecified fields will not be
modified.
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--admins>=I<s>
It must be a comma-separated list of user names, or empty.
=item B<--backup>
Whether to backup when modifying files.
Backup is written with `.bak` extension in the same directory. Unmodified file
will not be backed up. Previous backup will be overwritten.
=item B<--encpass>=I<s>
Encrypted password.
=item B<--gid>=I<s>
Numeric group ID.
=item B<--group>=I<s>*
Group name.
=item B<--members>=I<s>
List of usernames that are members of this group, separated by commas.
=item B<--pass>=I<s>
Password, generally should be "x" which means password is encrypted in gshadow.
=back
=head2 Output options
=over
=item B<--format>=I<s>
Choose output format, e.g. json, text.
Default value:
undef
=item B<--json>
Set output format to json.
=item B<--naked-res>
When outputing as JSON, strip result envelope.
Default value:
0
By default, when outputing as JSON, the full enveloped result is returned, e.g.:
[200,"OK",[1,2,3],{"func.extra"=>4}]
The reason is so you can get the status (1st element), status message (2nd
element) as well as result metadata/extra result (4th element) instead of just
the result (3rd element). However, sometimes you want just the result, e.g. when
you want to pipe the result for more post-processing. In this case you can use
`--naked-res` so you just get:
[1,2,3]
( run in 0.448 second using v1.01-cache-2.11-cpan-39bf76dae61 )